{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<div align=\"right\"><i>Peter Norvig<br>2012<br>updated 2019, 2020</i></div>\n",
    "\n",
    "# Weighing Twelve Balls on a Scale: 🎱🎱🎱🎱 ⚖ 🎱🎱🎱🎱 \n",
    "\n",
    "> *You are given twelve identical-looking balls and a two-sided scale. One of the balls is of a different weight, although you don't know whether it is lighter or heavier. How can you use just three weighings of the scale to determine not only what the different ball is, but also whether it is lighter or heavier?*\n",
    "\n",
    "This is [a classic](https://en.wikipedia.org/wiki/Balance_puzzle) brain-teaser puzzle (first appearing in 1945), meant to be solved with paper and pencil.  \n",
    "\n",
    "However I want to solve not just this specific puzzle, but related puzzles where you can vary (a) the number of balls, (b) the number of weighings allowed, and (c) whether the different ball might be heavier, lighter, or either, or neither. So I'll be better served by a computer program, not a pencil. \n",
    "\n",
    "I originally wrote this program in Lisp around 1980, ported it to Python in 2012, and am republishing it here in revised form after I saw the puzzle was mentioned in the [538 Riddler](https://fivethirtyeight.com/features/which-billiard-ball-is-rigged/) for 16 August 2019. It also appeared in a [Numberplay](https://wordplay.blogs.nytimes.com/2014/07/21/12coin/) column in 2014 (with coins instead of balls), in the Museum of Math's [Mind-Benders for the Quarantined!](https://momath.org/civicrm/?page=CiviCRM&q=civicrm/event/info&reset=1&id=1620) series in 2020, and in many other venues.\n",
    "\n",
    "\n",
    "# Defining the Vocabulary\n",
    "    \n",
    "Here are the concepts I'm dealing with:\n",
    "\n",
    "- **ball**: A ball is represented by a positive integer. A list of balls by a list, e.g. `[1, 2, 3]`.\n",
    "- **oddball**: One of the balls is different in weight; I'll use the term **oddball** to indicate which ball is different, and how. I'll use `+N` to mean that ball `N` is heavier, `-N` to mean ball `N` is lighter, and `0` to mean that all the balls are the same. (So `0` cannot be a ball number.) \n",
    "- **puzzle**: I'll express the puzzle stated above with `Puzzle(N=12, weighings=3)`. A puzzle is defined by the number of balls, the number of weighings allowed, and the possible oddballs (I'll say how to describe them later).\n",
    "- **weighing**: I can weigh a collection of balls on the left versus a collection on the right, and the result will be that the left side is greater than, equal to, or less than the right in weight. I'll denote that with the call `weigh(L, R, oddball)`, which returns a string, `'gt'`, `'eq'`, or `'lt'`.\n",
    "- **weight**: I'll arbitrarily say that a normal ball weighs 100, a lighter ball 99, and a heavier ball 101.\n",
    "- **solution**: Given a puzzle, a solution is a **strategy tree** that can correctly discover the oddball, whatever it is, in the allowable number of weighings. `valid(tree, puzzle)` is true when the tree is a valid solution for the puzzle. `None` indicates the failure to find a solution.\n",
    "- **strategy tree**: A tree whose leaf nodes are oddballs and whose interior nodes have 5 components:  `Node(L, R, gt, eq, lt)` is a node where `L` and `R` are the lists of balls to be weighed, and `gt`, `eq`, and `lt` are branches for subtrees corresponding to the three possible weighing results. \n",
    "- **following a path**: I'll use `follow(tree, oddball)` to say *follow the path through the tree, doing each weighing under the assumption of the given oddball, and return the leaf node reached by the path&mdash;the oddball that the tree predicts.* Note that the function `follow` gets to see what the oddball is, but the `tree` does not; the tree has to figure it out by doing weighings.\n",
    "\n",
    "\n",
    "\n",
    "# Implementation of Data Types\n",
    "\n",
    "Most of the types are straightforward. In a call to `Puzzle(...)` class, you can specify the allowable oddballs in two ways:\n",
    "- Use `oddballs={...}` to specify an explicit set of oddballs: any set of positive, negative, or zero integers.\n",
    "- Use `odd={...}`, specifying a subset of `{-1, 0, +1}`, where `-1` means \"any one ball might be lighter,\" `+1` means \"any one ball might be heavier,\" and `0` means \"it might be that no ball is odd; they might all weigh the same.\" The default is `odd={-1, +1}`, meaning that the oddball can be any ball, and can be lighter or heavier.\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from collections import namedtuple\n",
    "import random\n",
    "\n",
    "Ball = int            # Balls are positive integers\n",
    "Leaf = Oddball = int  # Oddballs are positive, negative, or zero integers\n",
    "Node = namedtuple('Node', 'L, R, gt, eq, lt') # A Node is a tuple of 5 components\n",
    "Tree = (Node, Leaf)   # A tree can be an interior node or a leaf\n",
    "\n",
    "class Puzzle:\n",
    "    \"Represent a specific ball-weighing puzzle.\"\n",
    "    def __init__(self, N=12, weighings=3, odd={-1, +1}, oddballs=None):\n",
    "        self.balls     = list(range(1, N + 1))\n",
    "        self.weighings = weighings\n",
    "        self.oddballs  = oddballs or {b * o for b in self.balls for o in odd}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Implementation of Basic Functions\n",
    "\n",
    "Here are all the straightforward utility functions; everything except the main function `find_tree` that actually solves a puzzle."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def weigh(L, R, oddball) -> str:\n",
    "    \"Weigh balls L against balls R, given the oddball; return 'gt', 'eq', or 'lt'.\"\n",
    "    Δ = sum(weight(b, oddball) for b in L) - sum(weight(b, oddball) for b in R)\n",
    "    return 'gt' if Δ > 0 else 'lt' if Δ < 0 else 'eq'\n",
    "\n",
    "def weight(ball, oddball) -> int: \n",
    "    \"How heavy is this ball (given that we know what the oddball is)?\"\n",
    "    return 101 if +ball == oddball else 99 if -ball == oddball else 100\n",
    "    \n",
    "def solve(puzzle) -> Tree or None:\n",
    "    \"Return a valid tree (one that solves the puzzle), or None for failure.\"\n",
    "    tree = find_tree(puzzle, puzzle.oddballs, puzzle.weighings)\n",
    "    return tree if valid(tree, puzzle) else None\n",
    "    \n",
    "def follow(tree, oddball) -> Oddball:\n",
    "    \"Follow a path through the tree and return the oddball that the tree leads us to.\"\n",
    "    if is_leaf(tree):\n",
    "        return tree\n",
    "    else:\n",
    "        branch = weigh(tree.L, tree.R, oddball)\n",
    "        return follow(getattr(tree, branch), oddball)\n",
    "    \n",
    "def valid(tree, puzzle) -> bool:\n",
    "    \"Does the strategy tree solve the puzzle correctly for all possible oddballs?\"\n",
    "    return (tree is not None and\n",
    "            depth(tree) <= puzzle.weighings and \n",
    "            all(follow(tree, oddball) == oddball \n",
    "                for oddball in puzzle.oddballs))\n",
    "\n",
    "def depth(tree) -> int:\n",
    "    \"Maximum depth (number of weighings) in tree.\"\n",
    "    return (0 if is_leaf(tree) or tree is None\n",
    "            else 1 + max(depth(tree.gt), depth(tree.eq), depth(tree.lt)))\n",
    "\n",
    "def first(iterable): return next(iter(iterable))\n",
    "\n",
    "def is_leaf(tree): return isinstance(tree, Leaf)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's try out some of these functions:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# A puzzle with 8 balls and 3 weighings allowed\n",
    "p8 = Puzzle(8, 3) \n",
    "p8.weighings"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1, 2, 3, 4, 5, 6, 7, 8]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p8.balls "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{-8, -7, -6, -5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 6, 7, 8}"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p8.oddballs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'gt'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# If we weigh balls [1, 2] against [3, 4] and 4 is lighter, the result should be 'gt'\n",
    "weigh([1, 2], [3, 4], -4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "100"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "weight(1, oddball=-4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "99"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "weight(4, oddball=-4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Finding a Valid Solution Tree\n",
    "\n",
    "Now we've got all the pieces we need to find a valid tree to solve a puzzle. The key concept is that a **weighing** gives us information by making a **partition** of the possible **oddballs** into branches for each of the three possible weighing results: `gt`, `eq`, or `lt`. If each of the partitions is small enough, subsequent weighings can handle each of them. Here's what I mean by a partition:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def partition(L, R, oddballs) -> dict:\n",
    "    \"A dict that partitions the possible outcomes from weighing L versus R.\"\n",
    "    part = dict(gt=set(), eq=set(), lt=set())\n",
    "    for odd in oddballs:\n",
    "        part[weigh(L, R, odd)].add(odd)\n",
    "    return part"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For example, with 12 balls, if we weigh balls [1, 2, 3] on the left versus [10, 11, 12] on the right, then there are 6 ways  the left side can be greater than the right: either 10, 11 or 12 is lighter or  1, 2, or 3 is heavier. Similarly there are 6 ways of getting a `lt` weighing result. The remaining 12 possibilities&mdash;balls 4 through 9 being either heavier or lighter&mdash;show up in the `eq` branch of the partition:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'gt': {-12, -11, -10, 1, 2, 3},\n",
       " 'eq': {-9, -8, -7, -6, -5, -4, 4, 5, 6, 7, 8, 9},\n",
       " 'lt': {-3, -2, -1, 10, 11, 12}}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p12 = Puzzle(12, 3)\n",
    "\n",
    "partition([1, 2, 3], [10, 11, 12], p12.oddballs)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If this was the first weighing in our strategy tree, could we go on to solve the puzzle in 3 weighings? \n",
    "\n",
    "**No!** The key insight is that a tree with <i>w</i> weighings can distinguish at most  3<sup><i>w</i></sup> oddballs, because each weighing has three possible results. After using one weighing we can only solve the puzzle if every branch of the partition has no more than 3<sup>2</sup> = 9 oddballs, but here we have 12 oddballs in the `eq` branch. We call this a **bad partition**. A good partition is one where no branch has more than 3<sup><i>w</i></sup> oddballs. Being a good partition does not guarantee that the puzzle is solvable from there; but being a bad partition guarantees that it is not solvable.\n",
    " "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "def good_partition(part, w) -> bool:\n",
    "    \"Is this a partition which might lead to a solution in w more weighings?\"\n",
    "    return all(len(oddballs) <= 3 ** w for oddballs in part.values())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The following is a good partition because each of the branches has 8 possibilities, and 8 is less than 3<sup>2</sup>:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'gt': {-12, -11, -10, -9, 1, 2, 3, 4},\n",
       " 'eq': {-8, -7, -6, -5, 5, 6, 7, 8},\n",
       " 'lt': {-4, -3, -2, -1, 9, 10, 11, 12}}"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p = partition([1, 2, 3, 4], [9, 10, 11, 12], p12.oddballs)\n",
    "p"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "good_partition(p, 2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "So now we have a viable approach to implementing `find_tree`:\n",
    "\n",
    "   - We call `find_tree(puzzle, oddballs, weighings)`. At the top level, the oddballs and number of weighings come from the puzzle. At recursive levels, we use the oddballs from the partition, and reduce the number of remaining weighings by 1.\n",
    "   - We handle trivial cases when there are zero or one oddballs remaining, or no weighings remaining.\n",
    "   - Otherwise, we ask `good_partitions` to generate random partitions and yield the good ones.\n",
    "   - Given a good partition, try to find valid trees for each of the three branches. If we can find that, return the tree as a solution.\n",
    "   - If we can't find good trees for any partition, return `None` to indicate failure.\n",
    "   \n",
    "The rest of the work is done by `good_partitions`:\n",
    "\n",
    "   - Select two lists of balls to be weighed, `L` and `R`, both of length `B`.\n",
    "   - See what partition `L` and `R` gives us.\n",
    "   - If it is good, yield the `(L, R, partition)` tuple.\n",
    "   - Repeat for all possible values of `B`.\n",
    "   - Randomly shuffle the balls and repeat the whole process, trying to generate more good partitions. I chose to repeat 100 times, to have a good chance of finding a solution for solvable puzzles, and of terminating in just a few seconds for unsolvable puzzles. \n",
    "   - However, I note that on the first weighing, there's no sense making multiple tries with randomly shuffled  balls&mdash;the only choice that matters is how many balls, `B`, to put on each side, because the balls are undifferentiated at this point. So I try each value of `B` only once on the first weighing.\n",
    "   - If I wanted to solve puzzles with thousands of balls, not just dozens, I would come back and improve `good_partitions`, passing information from the first weighing in to subsequent weighings."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "def find_tree(puzzle, oddballs, weighings) -> Tree or None:\n",
    "    \"Find a tree that covers all the oddballs in the given number of weighings.\"\n",
    "    if len(oddballs) == 1:\n",
    "        return first(oddballs) # One possibility left; we're done; leaf node\n",
    "    elif len(oddballs) == 0:\n",
    "        return 0               # No oddball (a possibility for some puzzles)\n",
    "    elif weighings == 0:\n",
    "        return None            # No solution; failure\n",
    "    else:\n",
    "        for L, R, part in good_partitions(puzzle, oddballs, weighings - 1):\n",
    "            subtrees = {r: find_tree(puzzle, part[r], weighings - 1) for r in part}\n",
    "            if None not in subtrees.values(): \n",
    "                return Node(L, R, **subtrees)\n",
    "    \n",
    "def good_partitions(puzzle, oddballs, weighings, tries=100):\n",
    "    \"Yield random (L, R, partition) tuples of good partitions.\"\n",
    "    balls = sorted(puzzle.balls)\n",
    "    if weighings == puzzle.weighings: tries = 1 # First weighing\n",
    "    for _ in range(tries): \n",
    "        for B in range(1, 1 + len(balls) // 2):\n",
    "            L, R = balls[:B], balls[-B:]\n",
    "            part = partition(L, R, oddballs)\n",
    "            if good_partition(part, weighings):\n",
    "                yield L, R, part\n",
    "        random.shuffle(balls)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here we see that  `good_partitions` does its job:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "([1, 2, 3, 4],\n",
       " [9, 10, 11, 12],\n",
       " {'gt': {-12, -11, -10, -9, 1, 2, 3, 4},\n",
       "  'eq': {-8, -7, -6, -5, 5, 6, 7, 8},\n",
       "  'lt': {-4, -3, -2, -1, 9, 10, 11, 12}})"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "next(good_partitions(p12, p12.oddballs, 2))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Solving Some Puzzles\n",
    "\n",
    "Now we're ready to solve puzzles! We'll start with the original 12-ball puzzle, `p12`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Node(L=[1, 2, 3, 4], R=[9, 10, 11, 12], gt=Node(L=[11, 3, 10, 2], R=[6, 12, 8, 5], gt=Node(L=[9, 4, 10, 8], R=[12, 5, 6, 3], gt=-12, eq=2, lt=3), eq=Node(L=[8, 6], R=[1, 9], gt=-9, eq=4, lt=1), lt=Node(L=[1, 2], R=[11, 12], gt=-11, eq=-10, lt=0)), eq=Node(L=[12, 1, 10, 9, 4], R=[5, 11, 6, 8, 2], gt=Node(L=[1, 2, 3, 4, 5], R=[8, 9, 10, 11, 12], gt=-8, eq=-6, lt=-5), eq=Node(L=[1, 2, 3, 4, 5, 6], R=[7, 8, 9, 10, 11, 12], gt=-7, eq=0, lt=7), lt=Node(L=[1, 2, 3, 4, 5], R=[8, 9, 10, 11, 12], gt=5, eq=6, lt=8)), lt=Node(L=[11, 2, 7, 8], R=[1, 6, 3, 10], gt=Node(L=[10, 6], R=[1, 11], gt=-1, eq=-3, lt=11), eq=Node(L=[6, 7, 12, 4], R=[3, 5, 8, 10], gt=12, eq=9, lt=-4), lt=Node(L=[1, 2], R=[11, 12], gt=0, eq=10, lt=-2)))"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solve(p12)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "OK, that's hard to read&mdash;my bad. Let's look at a much easier puzzle: 3 balls, 1 weighing allowed, and the oddball can only be heavier:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Node(L=[1], R=[3], gt=1, eq=2, lt=3)"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tree = solve(Puzzle(3, 1, odd={+1}))\n",
    "tree"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This trivial tree says you weigh the first ball against the third (leaving the second unweighed), and the three possible weighing results tell you which of the three balls  is heavier. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Prettier Output\n",
    "\n",
    "Let's make the output easier to read. I'll use `[1·2·3·4]⚖[9·10·11·12]` to represent a weighing and I'll use `>:` to represent a branch. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "def do(puzzle):\n",
    "    \"Print the solution to the puzzle as indented text.\"\n",
    "    tree = solve(puzzle)\n",
    "    print(indented(tree))\n",
    "    \n",
    "def indented(tree, i=0, prefix='') -> str:\n",
    "    \"Pretty, indented string representing a strategy tree.\"\n",
    "    if tree == 0 or tree == None:\n",
    "        return f'{prefix}{tree}'\n",
    "    elif is_leaf(tree):\n",
    "        return f'{prefix}{tree:+d}'\n",
    "    else:\n",
    "        subtrees = (indented(tree.gt, i+1, '>:'), \n",
    "                    indented(tree.eq, i+1, '=:'), \n",
    "                    indented(tree.lt, i+1, '<:'))\n",
    "        indent   = ('' if i == 0 else ('\\n' + ' ' * 3 * i))\n",
    "        return f'{indent}{prefix}{side(tree.L)}⚖{side(tree.R)} ➔ {\" \".join(subtrees)}'\n",
    "    \n",
    "def side(balls) -> str: return str(sorted(balls)).replace(', ', '·')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1]⚖[3] ➔ >:+1 =:+2 <:+3\n"
     ]
    }
   ],
   "source": [
    "# 3 balls, 1 weighing, only heavier balls possible\n",
    "do(Puzzle(3, 1, {+1}))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1]⚖[3] ➔ \n",
      "   >:[1]⚖[2] ➔ >:+1 =:-3 <:0 \n",
      "   =:[3]⚖[2] ➔ >:-2 =:0 <:+2 \n",
      "   <:[3]⚖[2] ➔ >:+3 =:-1 <:0\n"
     ]
    }
   ],
   "source": [
    "# 3 balls, 2 weighings, lighter or heavier balls possible\n",
    "do(Puzzle(3, 2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[3]⚖[2] ➔ >:-2 =:+1 <:-3\n"
     ]
    }
   ],
   "source": [
    "# 3 balls, 1 weighings, either ball 1 is heavy or 2 or 3 is light\n",
    "do(Puzzle(3, 1, oddballs={+1, -2, -3}))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1·2·3·4]⚖[9·10·11·12] ➔ \n",
      "   >:[2·4·10]⚖[1·5·12] ➔ \n",
      "      >:[1·2·5·8·11]⚖[3·4·6·7·9] ➔ >:+2 =:-12 <:+4 \n",
      "      =:[1·4·7·11·12]⚖[2·5·6·9·10] ➔ >:-9 =:+3 <:-11 \n",
      "      <:[1]⚖[12] ➔ >:+1 =:-10 <:0 \n",
      "   =:[2·3·6·10]⚖[5·8·11·12] ➔ \n",
      "      >:[1·2·3·4·5]⚖[8·9·10·11·12] ➔ >:-8 =:+6 <:-5 \n",
      "      =:[1·2·3·4·5·6]⚖[7·8·9·10·11·12] ➔ >:-7 =:0 <:+7 \n",
      "      <:[1·2·3·4·5]⚖[8·9·10·11·12] ➔ >:+5 =:-6 <:+8 \n",
      "   <:[3·4·7·11]⚖[2·6·8·10] ➔ \n",
      "      >:[8·12]⚖[2·9] ➔ >:-2 =:+11 <:0 \n",
      "      =:[3·4·6·9·11]⚖[2·5·7·10·12] ➔ >:+9 =:-1 <:+12 \n",
      "      <:[4·5·6·12]⚖[1·3·8·9] ➔ >:-3 =:+10 <:-4\n"
     ]
    }
   ],
   "source": [
    "# The original puzzle with 12 balls and 3 weighings\n",
    "do(p12)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1·2·3·4]⚖[9·10·11·12] ➔ \n",
      "   >:[2·11·12]⚖[1·8·9] ➔ \n",
      "      >:[1·2]⚖[11·12] ➔ >:+2 =:-9 <:0 \n",
      "      =:[6·7]⚖[3·10] ➔ >:-10 =:+4 <:+3 \n",
      "      <:[1·3·8·10·11]⚖[2·4·5·7·9] ➔ >:+1 =:-12 <:-11 \n",
      "   =:[5·9·10·11·12]⚖[1·3·4·6·7] ➔ \n",
      "      >:[1·3·4·9·12]⚖[5·7·8·10·11] ➔ >:-7 =:-6 <:+5 \n",
      "      =:[1·2·3·4·5]⚖[8·9·10·11·12] ➔ >:-8 =:0 <:+8 \n",
      "      <:[3·4·7]⚖[6·9·11] ➔ >:+7 =:-5 <:+6 \n",
      "   <:[3·6·9·10]⚖[2·5·8·12] ➔ \n",
      "      >:[2·5·8·9]⚖[1·4·6·11] ➔ >:+9 =:+10 <:-2 \n",
      "      =:[3·6·7·12]⚖[2·4·10·11] ➔ >:-4 =:-1 <:+11 \n",
      "      <:[1]⚖[12] ➔ >:0 =:-3 <:+12\n"
     ]
    }
   ],
   "source": [
    "# A different random solution to the same puzzle\n",
    "do(p12)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "I note that the traditional answer to the puzzle weighs 4 balls on each side of the first weighing, three balls on the second weighing, and 2 balls on the third weighing. But my program is not so orderly. It always weighs 4 balls on the first weighing (because that is the only good partition), but from there it can vary; it need not minimize the number of balls on each side of the scale, nor make one branch of the tree be symmetric with another branch.\n",
    "\n",
    "# Other Puzzles: 3 Weighings\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can do **12 balls in 3 weighings** even when we add in the possibility that all the balls weigh the same:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1·2·3·4]⚖[9·10·11·12] ➔ \n",
      "   >:[4·7·11·12]⚖[1·5·6·9] ➔ \n",
      "      >:[6·9]⚖[7·8] ➔ >:0 =:+4 <:-9 \n",
      "      =:[2·6·9·11]⚖[1·3·4·7] ➔ >:+2 =:-10 <:+3 \n",
      "      <:[1·4·12]⚖[6·7·10] ➔ >:+1 =:-11 <:-12 \n",
      "   =:[1·4·9]⚖[5·7·8] ➔ \n",
      "      >:[1·2·3·4·5]⚖[8·9·10·11·12] ➔ >:-8 =:-7 <:-5 \n",
      "      =:[1·2·3·4·5·6]⚖[7·8·9·10·11·12] ➔ >:+6 =:0 <:-6 \n",
      "      <:[1·2·3·4·5]⚖[8·9·10·11·12] ➔ >:+5 =:+7 <:+8 \n",
      "   <:[1·4·12]⚖[2·7·10] ➔ \n",
      "      >:[1]⚖[12] ➔ >:0 =:-2 <:+12 \n",
      "      =:[2·6·10·11·12]⚖[1·5·7·8·9] ➔ >:+11 =:-3 <:+9 \n",
      "      <:[7·8·11]⚖[4·5·10] ➔ >:-4 =:-1 <:+10\n"
     ]
    }
   ],
   "source": [
    "do(Puzzle(12, 3, odd={-1, 0, +1}))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Can we solve the **13-balls in 3 weighings** puzzle, which has 26 possibilities? After all, 26 is less than 3<sup>3</sup>."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "p13 = Puzzle(13, 3)\n",
    "do(p13)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**No**, and the reason is that there is no first weighing that partitions the 26 possibilities into 9/9/8; the best we can do is partition into 8/10/8 or 10/6/10, and 10 possibilities can't be distinguished in the remaining two weighings:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'gt': {-13, -12, -11, -10, 1, 2, 3, 4},\n",
       " 'eq': {-9, -8, -7, -6, -5, 5, 6, 7, 8, 9},\n",
       " 'lt': {-4, -3, -2, -1, 10, 11, 12, 13}}"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "partition([1, 2, 3, 4], [10, 11, 12, 13], p13.oddballs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'gt': {-13, -12, -11, -10, -9, 1, 2, 3, 4, 5},\n",
       " 'eq': {-8, -7, -6, 6, 7, 8},\n",
       " 'lt': {-5, -4, -3, -2, -1, 9, 10, 11, 12, 13}}"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "partition([1, 2, 3, 4, 5], [9, 10, 11, 12, 13], p13.oddballs)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can do **27 balls in 3 weighings** if we know that the oddball can only be lighter, not heavier:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1·2·3·4·5·6·7·8·9]⚖[19·20·21·22·23·24·25·26·27] ➔ \n",
      "   >:[1·5·6·7·14·16·18·19·23·25]⚖[2·8·10·11·12·15·17·21·24·26] ➔ \n",
      "      >:[2·10·11·12·18·24]⚖[5·7·13·16·26·27] ➔ >:-26 =:-21 <:-24 \n",
      "      =:[1·2·4·12·20·24·25]⚖[6·7·8·13·14·17·22] ➔ >:-22 =:-27 <:-20 \n",
      "      <:[19]⚖[23] ➔ >:-23 =:-25 <:-19 \n",
      "   =:[1·2·3·4·5·6·7·8·9·10·11·12]⚖[16·17·18·19·20·21·22·23·24·25·26·27] ➔ \n",
      "      >:[2·5·12·16·20·22·24]⚖[4·9·17·19·21·23·25] ➔ >:-17 =:-18 <:-16 \n",
      "      =:[1·2·3·4·5·6·7·8·9·10·11·12·13]⚖[15·16·17·18·19·20·21·22·23·24·25·26·27] ➔ >:-15 =:-14 <:-13 \n",
      "      <:[10·17·20]⚖[11·14·21] ➔ >:-11 =:-12 <:-10 \n",
      "   <:[2·4·9·12·16·17·20·23·25·26]⚖[1·5·8·10·11·13·14·19·21·22] ➔ \n",
      "      >:[1·2·3·7·10·12·13·14·15·21·25]⚖[6·8·9·11·16·17·18·19·22·23·24] ➔ >:-8 =:-5 <:-1 \n",
      "      =:[3·5·11·15·17·24·26]⚖[7·8·14·18·19·22·23] ➔ >:-7 =:-6 <:-3 \n",
      "      <:[4·5·8·10·15·16·18·20·27]⚖[1·2·11·12·17·21·23·24·25] ➔ >:-2 =:-9 <:-4\n"
     ]
    }
   ],
   "source": [
    "do(Puzzle(27, 3, {-1}))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And we can do **26 balls** under the condition that either one ball is lighter or all the balls weigh the same:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1·2·3·4·5·6·7·8·9]⚖[18·19·20·21·22·23·24·25·26] ➔ \n",
      "   >:[1·5·10·12·16·18·21·22]⚖[3·9·11·14·15·19·23·24] ➔ \n",
      "      >:[2·9·14·17·20·23]⚖[3·4·13·16·19·21] ➔ >:-19 =:-24 <:-23 \n",
      "      =:[3·7·15·17·20·22]⚖[11·14·16·21·24·25] ➔ >:-25 =:-26 <:-20 \n",
      "      <:[3·5·7·21]⚖[2·9·14·22] ➔ >:-22 =:-18 <:-21 \n",
      "   =:[1·2·3·4·5·6·7·8·9·10·11·12]⚖[15·16·17·18·19·20·21·22·23·24·25·26] ➔ \n",
      "      >:[8·16·18·21]⚖[1·2·17·20] ➔ >:-17 =:-15 <:-16 \n",
      "      =:[1·2·3·4·5·6·7·8·9·10·11·12·13]⚖[14·15·16·17·18·19·20·21·22·23·24·25·26] ➔ >:-14 =:0 <:-13 \n",
      "      <:[1·2·4·10·13·15·22·23]⚖[6·7·8·12·16·17·20·21] ➔ >:-12 =:-11 <:-10 \n",
      "   <:[6·7·9·13·15·20·22·23·26]⚖[1·2·3·17·18·19·21·24·25] ➔ \n",
      "      >:[1·7·9·11·16·18·19·21·24·26]⚖[2·4·5·8·10·12·14·22·23·25] ➔ >:-2 =:-3 <:-1 \n",
      "      =:[2·3·4·6·9·11·14·15·16·17·22]⚖[1·7·8·10·13·18·20·21·23·24·25] ➔ >:-8 =:-5 <:-4 \n",
      "      <:[1·3·4·9]⚖[6·14·20·25] ➔ >:-6 =:-7 <:-9\n"
     ]
    }
   ],
   "source": [
    "do(Puzzle(26, 3, {-1, 0}))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here's a puzzle with **26 balls** where either one of the odd-numbered balls is heavier, or one of the even-numbered balls is lighter, or no ball is odd."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, -26, -24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -4, -2}\n"
     ]
    }
   ],
   "source": [
    "N = 26\n",
    "p26 = Puzzle(N, 3, oddballs={(+b if b % 2 else -b) for b in range(N + 1)})\n",
    "print(p26.oddballs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1·8·15·16·17·23·24·25·26]⚖[4·5·7·9·10·11·18·19·20] ➔ \n",
      "   >:[1·2·3·4·5·6·7·8·9]⚖[18·19·20·21·22·23·24·25·26] ➔ \n",
      "      >:[1·13·18]⚖[5·23·24] ➔ >:+1 =:-20 <:-18 \n",
      "      =:[3·6·8·9·11·19·20·23·25]⚖[4·10·12·14·17·18·21·22·26] ➔ >:-10 =:+15 <:+17 \n",
      "      <:[2·8·10·11·16·17·23·24]⚖[1·5·9·12·14·18·25·26] ➔ >:+23 =:-4 <:+25 \n",
      "   =:[3·4·6·14·18·19·21·23·24·25]⚖[1·5·8·9·12·13·16·17·20·26] ➔ \n",
      "      >:[1·2·3·4·5·6]⚖[21·22·23·24·25·26] ➔ >:+3 =:-12 <:+21 \n",
      "      =:[1·2·3·4·5]⚖[22·23·24·25·26] ➔ >:-22 =:0 <:-2 \n",
      "      <:[3·6·8·9·15·23·26]⚖[1·2·10·11·14·17·20] ➔ >:-14 =:+13 <:-6 \n",
      "   <:[3·5·8·20·24]⚖[9·10·12·16·26] ➔ \n",
      "      >:[4·14·16·18]⚖[7·17·20·26] ➔ >:-26 =:+5 <:-16 \n",
      "      =:[1·2·3·4·5·6·7·8]⚖[19·20·21·22·23·24·25·26] ➔ >:+7 =:+11 <:+19 \n",
      "      <:[1·2·3·4·5·6·7·8]⚖[19·20·21·22·23·24·25·26] ➔ >:-24 =:+9 <:-8\n"
     ]
    }
   ],
   "source": [
    "do(p26)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Another variation: **27 balls, 3 weighings**, the oddball can only be heavier, but one ball (number 27) is poisonous and can't be touched or placed on the balance scale. It might, however be the heavier ball, and you still need to report it as such if it is. \n",
    "\n",
    "We describe this situation by defining a puzzle with 26 (weighable) balls, but with the oddballs covering `{+1, +2, ..., +27}`. Note that when all three weighings are equal, the strategy tree reports `=:+27`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1·2·3·4·5·6·7·8·9]⚖[18·19·20·21·22·23·24·25·26] ➔ \n",
      "   >:[2·6·7·18·21]⚖[3·4·5·13·14] ➔ \n",
      "      >:[7·8·16·18·20·25·26]⚖[2·3·12·13·15·17·19] ➔ >:+7 =:+6 <:+2 \n",
      "      =:[2·3·6·7·9·17·26]⚖[4·5·8·13·18·24·25] ➔ >:+9 =:+1 <:+8 \n",
      "      <:[3·8·11·12·16·17·19·21·22]⚖[1·5·6·7·9·10·13·23·26] ➔ >:+3 =:+4 <:+5 \n",
      "   =:[1·2·3·4·5·6·7·8·9·10·11·12]⚖[15·16·17·18·19·20·21·22·23·24·25·26] ➔ \n",
      "      >:[4·11]⚖[12·21] ➔ >:+11 =:+10 <:+12 \n",
      "      =:[1·2·3·4·5·6·7·8·9·10·11·12·13]⚖[14·15·16·17·18·19·20·21·22·23·24·25·26] ➔ >:+13 =:+27 <:+14 \n",
      "      <:[3·4·13·17·18·23·26]⚖[2·5·7·8·10·15·21] ➔ >:+17 =:+16 <:+15 \n",
      "   <:[1·4·7·9·12·15·18·21·23]⚖[5·6·8·14·16·17·20·22·24] ➔ \n",
      "      >:[5·8·10·12·19·20·21]⚖[1·6·9·15·17·23·25] ➔ >:+21 =:+18 <:+23 \n",
      "      =:[11·19·21]⚖[7·13·25] ➔ >:+19 =:+26 <:+25 \n",
      "      <:[1·2·3·6·7·8·9·10·12·14·19·24]⚖[4·5·11·13·15·17·18·21·22·23·25·26] ➔ >:+24 =:+20 <:+22\n"
     ]
    }
   ],
   "source": [
    "do(Puzzle(26, 3, oddballs=range(1, 28)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 4 Weighings\n",
    "\n",
    "We can tackle larger puzzles. With 4 weighings, we can theoretically handle up to 3<sup>4</sup> = 81 possibilities. Can we solve for **40 balls**?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "p40 = Puzzle(40, 4)\n",
    "\n",
    "do(p40)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Unfortunately, **no**, we can't find a good partition, which would leave no more than 27 oddballs in each branch. I'll introduce the function `partition_sizes` so you don't have to count:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "def partition_sizes(puzzle, B):\n",
    "    \"How big is each branch of a partition with B balls on both sides?\"\n",
    "    part = partition(puzzle.balls[:B], puzzle.balls[-B:], puzzle.oddballs)\n",
    "    return [len(oddballs) for oddballs in part.values()]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[26, 28, 26]"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "partition_sizes(p40, 13)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[28, 24, 28]"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "partition_sizes(p40, 14)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "How about **39 balls, 4 weighings**, heavier or lighter, with the possibility that no ball is odd. That's 39 &times; 2 + 1 = 79 possibilities, which is less than 81."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "p39 = Puzzle(39, 4, {-1, 0, +1})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[26, 27, 26]"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "partition_sizes(p39, 13)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1·2·3·4·5·6·7·8·9·10·11·12·13]⚖[27·28·29·30·31·32·33·34·35·36·37·38·39] ➔ \n",
      "   >:[2·4·9·14·15·16·17·19·26·35·37·38·39]⚖[1·5·6·7·11·23·24·25·27·28·30·31·34] ➔ \n",
      "      >:[1·3·4·7·11·21·22·23·31·35·36·38]⚖[2·6·9·12·16·18·20·26·32·33·34·37] ➔ \n",
      "         >:[1·2·3·4]⚖[36·37·38·39] ➔ >:+4 =:-34 <:0 \n",
      "         =:[13·16·19·22·30·33]⚖[1·2·17·20·27·38] ➔ >:-27 =:-28 <:-30 \n",
      "         <:[3·6·7·10·18·21·30]⚖[9·13·14·19·31·32·38] ➔ >:-31 =:+2 <:+9 \n",
      "      =:[8·12·19·25·27·28·32·33]⚖[1·7·10·18·20·29·34·37] ➔ \n",
      "         >:[2·5·8·9·16·18·22·25·33·36·38]⚖[1·3·6·10·12·14·24·28·31·32·39] ➔ >:+8 =:-29 <:+12 \n",
      "         =:[7·9·13·14·15·23·25·31·36·38]⚖[5·6·10·12·18·21·26·28·29·32] ➔ >:+13 =:+3 <:-36 \n",
      "         <:[8·17·20·21·22·35·36]⚖[4·10·19·30·33·34·37] ➔ >:-33 =:-32 <:+10 \n",
      "      <:[1·3·11·17·18·24·28·30·34·35·37]⚖[2·7·8·9·10·16·23·27·31·33·39] ➔ \n",
      "         >:[1·3·7·14·18·21·22·23·25·26·27·33·35·39]⚖[2·4·6·8·9·10·12·13·16·24·28·29·31·36] ➔ >:+1 =:+11 <:-39 \n",
      "         =:[2·6·8·10·13·14·24·27·39]⚖[5·9·12·16·17·21·31·33·36] ➔ >:+6 =:-38 <:+5 \n",
      "         <:[3·6·15·16·27·34]⚖[7·12·17·25·35·38] ➔ >:-35 =:-37 <:+7 \n",
      "   =:[7·8·13·15·16·18·19·22·28·31·38]⚖[3·6·9·12·14·20·21·24·27·32·33] ➔ \n",
      "      >:[2·4·5·7·13·14·15·21·23·25·26·30·34·36·38]⚖[3·6·9·11·12·17·20·22·24·27·28·29·31·35·39] ➔ \n",
      "         >:[3·9·12·15·16·21·24·32·35]⚖[2·8·10·18·23·25·31·34·39] ➔ >:+15 =:-20 <:-24 \n",
      "         =:[2·6·8·9·10·11·13·15·16·20·21·22·24·25·28·29·31·33·38]⚖[1·3·4·5·7·12·14·17·18·23·26·27·30·32·34·35·36·37·39] ➔ >:+16 =:+19 <:+18 \n",
      "         <:[11·12·25·27·30]⚖[1·2·14·20·22] ➔ >:-14 =:-21 <:+22 \n",
      "      =:[5·6·7·9·10·14·15·21·22·23·26·30·31·32·36]⚖[1·2·3·11·13·16·17·18·19·28·29·34·35·38·39] ➔ \n",
      "         >:[1·3·8·12·13·14·18·19·20·21·22·25·27·30·31·35·36]⚖[2·4·5·6·7·10·11·15·17·24·26·29·32·33·37·38·39] ➔ >:-17 =:+23 <:+26 \n",
      "         =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15]⚖[25·26·27·28·29·30·31·32·33·34·35·36·37·38·39] ➔ >:-25 =:0 <:+25 \n",
      "         <:[1·2·4·8·9·10·12·14·15·16·17·19·21·23·24·27·33]⚖[5·6·7·11·13·18·20·22·25·28·30·31·32·34·35·36·38] ➔ >:+17 =:-26 <:-23 \n",
      "      <:[2·9·11·15·16·21·23·26·37·39]⚖[1·3·8·18·19·20·27·28·29·38] ➔ \n",
      "         >:[3·10·16·18·22·24·30·34·39]⚖[5·19·20·23·27·28·31·37·38] ➔ >:-19 =:+21 <:-18 \n",
      "         =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16]⚖[24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39] ➔ >:+14 =:-22 <:+24 \n",
      "         <:[2·31·36]⚖[16·20·21] ➔ >:-16 =:-15 <:+20 \n",
      "   <:[1·7·9·21·25·26·27·30·32·34·37·38]⚖[2·5·12·16·18·19·24·28·31·33·36·39] ➔ \n",
      "      >:[10·11·14·17·18·19·22·29·30·31·32·33·36]⚖[4·5·9·13·16·23·26·27·28·35·37·38·39] ➔ \n",
      "         >:[3·4·11·14·16·19·20·24·25·30·35·39]⚖[2·7·8·15·18·21·23·26·29·32·36·37] ➔ >:+30 =:-5 <:+32 \n",
      "         =:[1·11·13·15·20·35·37]⚖[8·12·17·18·32·34·36] ➔ >:-12 =:-2 <:+34 \n",
      "         <:[4·17·32·38]⚖[1·5·27·30] ➔ >:+38 =:+37 <:+27 \n",
      "      =:[1·4·6·9·10·12·16·17·18·19·24·28·31·35·38]⚖[2·5·11·13·14·15·20·21·23·25·32·33·36·37·39] ➔ \n",
      "         >:[11·23·37]⚖[13·26·31] ➔ >:-13 =:+35 <:-11 \n",
      "         =:[3·7·11·13·21·23·26·29·31·32·35·36·37·38]⚖[2·4·5·6·9·10·12·16·18·19·20·22·28·33] ➔ >:+29 =:-8 <:-3 \n",
      "         <:[4·9·17·18·23·26·27·29·33·35]⚖[1·6·11·14·16·22·28·32·37·39] ➔ >:-6 =:-10 <:-4 \n",
      "      <:[3·4·10·11·17·18·20·27·32·33·34·36·38]⚖[2·6·9·13·14·16·19·21·23·24·28·31·37] ➔ \n",
      "         >:[4·15·26·27·30·33·34]⚖[1·8·10·16·17·24·36] ➔ >:+33 =:-9 <:+36 \n",
      "         =:[6·12·14·18·19·22·24·29·36]⚖[7·10·11·25·27·28·35·38·39] ➔ >:-7 =:-1 <:+39 \n",
      "         <:[1·2·3·4·5·6·7·8·9]⚖[31·32·33·34·35·36·37·38·39] ➔ >:0 =:+28 <:+31\n"
     ]
    }
   ],
   "source": [
    "do(p39)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "How about **80 balls, 4 weighings** under the condition that no ball can be heavier (thus, 81 possibilities, the maximum):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27]⚖[54·55·56·57·58·59·60·61·62·63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80] ➔ \n",
      "   >:[1·2·3·5·6·12·15·16·18·20·21·23·26·32·33·38·42·43·44·45·51·53·56·59·60·64·65·66·72·74·79]⚖[4·7·9·11·13·17·22·24·25·30·31·34·35·39·40·41·46·47·48·49·50·52·54·55·58·61·63·67·76·77·80] ➔ \n",
      "      >:[1·3·5·6·8·14·20·22·24·25·27·32·33·34·39·43·44·45·46·54·56·57·58·62·63·66·72·74·78·79]⚖[2·9·11·12·15·16·18·19·21·23·26·28·29·30·31·38·40·42·48·50·64·65·67·68·69·70·71·75·77·80] ➔ \n",
      "         >:[2·5·8·11·17·22·27·37·39·40·42·49·52·58·65·74·76·80]⚖[3·4·12·14·15·18·26·35·43·45·46·48·60·62·67·69·70·71] ➔ >:-67 =:-77 <:-80 \n",
      "         =:[4·6·7·8·10·12·13·16·20·21·22·25·27·28·32·38·42·43·47·48·51·53·55·57·58·59·64·65·67·74·77·79]⚖[2·3·5·11·15·18·19·23·24·26·29·30·31·33·34·36·44·45·50·52·56·60·61·62·63·68·69·70·72·75·78·80] ➔ >:-61 =:-76 <:-55 \n",
      "         <:[5·6·7·9·12·13·14·17·19·21·26·38·39·41·42·46·54·72·77]⚖[1·8·15·16·24·25·36·48·50·51·52·53·58·60·64·66·69·70·71] ➔ >:-58 =:-63 <:-54 \n",
      "      =:[1·6·8·10·13·18·21·26·28·31·32·34·35·39·40·41·42·43·45·53·56·57·59·61·63·68·75·76·77]⚖[2·3·5·7·9·11·12·16·17·20·29·30·36·44·46·47·49·50·51·52·58·60·64·66·69·71·73·79·80] ➔ \n",
      "         >:[15·19·22·25·26·27·30·33·36·39·41·45·49·52·56·57·58·63·65·68·70·73·74·75·78]⚖[2·4·5·7·9·13·14·18·21·24·28·32·35·40·48·53·54·59·60·62·66·67·71·76·79] ➔ >:-71 =:-69 <:-73 \n",
      "         =:[12·47·54·57·58·70·76]⚖[2·6·21·22·37·48·78] ➔ >:-78 =:-62 <:-70 \n",
      "         <:[15·17·24·25·32·36·41·42·43·44·45·46·51·52·53·55·59·66·72·75]⚖[1·9·13·14·19·20·23·34·38·48·50·54·57·61·62·63·64·73·74·77] ➔ >:-57 =:-68 <:-75 \n",
      "      <:[2·3·4·7·9·10·13·14·18·23·27·30·39·52·54·57·58·62·64·66·69·70·73·74·75·76·77·78]⚖[1·5·8·12·15·16·17·24·26·31·33·34·35·38·40·41·45·46·47·49·50·53·56·61·65·67·71·79] ➔ \n",
      "         >:[7·10·11·13·21·25·28·30·38·43·48·53·54·55·66·68·72·73·74·76·79·80]⚖[4·5·8·15·23·34·37·39·40·41·42·46·49·52·56·59·61·63·69·71·77·78] ➔ >:-56 =:-65 <:-79 \n",
      "         =:[51·61·65·72]⚖[8·43·46·59] ➔ >:-59 =:-60 <:-72 \n",
      "         <:[1·2·4·5·6·9·11·12·14·16·17·18·28·33·39·40·41·42·44·45·46·52·54·55·56·57·58·63·65·68·72·73·74·80]⚖[3·8·13·15·19·20·21·22·23·24·25·26·27·30·31·32·34·35·36·37·38·48·50·51·53·60·62·64·69·70·75·76·78·79] ➔ >:-64 =:-66 <:-74 \n",
      "   =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36]⚖[45·46·47·48·49·50·51·52·53·54·55·56·57·58·59·60·61·62·63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80] ➔ \n",
      "      >:[1·2·9·11·12·15·21·24·28·41·45·52·53·54·59·62·63·69·80]⚖[5·6·13·16·17·18·23·30·34·38·40·44·47·49·50·57·64·67·71] ➔ \n",
      "         >:[1·2·3·7·8·9·10·18·21·22·28·29·32·35·36·39·41·42·44·48·49·57·59·61·62·68·69·71·74·75·76·80]⚖[4·6·11·12·14·17·19·25·26·30·31·33·34·37·40·43·45·46·47·51·54·55·56·58·60·63·64·70·73·77·78·79] ➔ >:-47 =:-50 <:-49 \n",
      "         =:[4·8·12·22·26·27·28·29·40·48·52·54·56·61·63·64·66·68·69·73·75]⚖[2·7·11·20·25·30·33·35·37·38·39·43·45·46·49·53·55·57·59·70·80] ➔ >:-46 =:-51 <:-48 \n",
      "         <:[34·50·52·65]⚖[2·38·41·53] ➔ >:-53 =:-45 <:-52 \n",
      "      =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39]⚖[42·43·44·45·46·47·48·49·50·51·52·53·54·55·56·57·58·59·60·61·62·63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80] ➔ \n",
      "         >:[6·18·22·29·34·42·50·51·59·60·75·76]⚖[3·19·21·25·35·38·43·45·48·49·58·77] ➔ >:-43 =:-44 <:-42 \n",
      "         =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40]⚖[41·42·43·44·45·46·47·48·49·50·51·52·53·54·55·56·57·58·59·60·61·62·63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80] ➔ >:-41 =:0 <:-40 \n",
      "         <:[5·8·31·39·45·47·50·71·77·79·80]⚖[3·4·10·28·37·46·52·54·58·60·61] ➔ >:-37 =:-38 <:-39 \n",
      "      <:[1·2·5·6·12·20·26·34·35·36·38·39·40·43·46·50·52·58·59·69·70·74·77]⚖[3·7·11·14·17·18·19·21·27·29·30·31·41·42·44·47·48·49·51·62·64·68·75] ➔ \n",
      "         >:[2·9·10·14·19·20·21·31·35·44·51·52·58·61·65·75·76·77·78]⚖[7·8·13·16·24·27·29·32·34·36·40·41·43·46·49·57·64·67·68] ➔ >:-29 =:-30 <:-31 \n",
      "         =:[1·5·19·22·31·32·37·44·52·54·61·66·77·79]⚖[12·15·16·18·24·33·42·49·51·56·62·69·75·80] ➔ >:-33 =:-28 <:-32 \n",
      "         <:[3·4·6·7·12·13·17·21·26·27·36·41·53·55·66·68·69·70·75·76]⚖[2·11·14·19·25·30·31·35·42·44·45·46·51·54·59·62·65·72·74·79] ➔ >:-35 =:-34 <:-36 \n",
      "   <:[1·7·8·11·12·15·16·22·26·31·34·38·40·41·43·45·46·52·57·61·62·63·65·69·72·73·75·77·80]⚖[9·10·14·18·19·23·24·25·27·29·30·33·35·39·42·44·47·48·49·51·53·55·58·59·60·64·67·76·79] ➔ \n",
      "      >:[5·9·11·19·22·24·29·33·34·36·39·45·46·53·60·69·71·72·73·74]⚖[1·3·7·8·10·13·16·17·18·20·21·25·47·49·50·52·54·68·75·76] ➔ \n",
      "         >:[7·9·10·16·19·26·28·35·38·46·51·55·78]⚖[4·15·25·37·42·44·48·50·53·60·63·73·75] ➔ >:-25 =:-18 <:-10 \n",
      "         =:[3·6·16·20·21·22·24·25·27·29·32·35·37·38·40·44·48·50·52·55·57·64·72·77]⚖[2·8·10·12·15·18·19·23·26·34·36·41·42·46·59·60·62·63·67·68·70·71·74·76] ➔ >:-23 =:-14 <:-27 \n",
      "         <:[2·19·22·30·38·40·46·51·63]⚖[3·9·36·55·59·74·75·77·79] ➔ >:-9 =:-24 <:-19 \n",
      "      =:[1·3·5·6·7·9·22·30·33·42·43·44·45·46·48·54·59·65·72·73·75]⚖[2·4·14·15·18·20·25·32·36·37·40·47·49·51·57·58·61·69·71·79·80] ➔ \n",
      "         >:[4·6·13·21·22·27·39·43·50·51·52·53·58·59·63·74·77]⚖[2·5·8·11·12·18·29·36·38·48·54·60·64·71·73·76·80] ➔ >:-2 =:-20 <:-4 \n",
      "         =:[17·26·40·48·49·53·66]⚖[1·20·21·42·47·50·55] ➔ >:-21 =:-13 <:-17 \n",
      "         <:[6·15·17·19·20·21·23·25·26·36·38·52·55·57·62·64·67·71·77·79]⚖[5·16·28·31·33·41·42·46·47·48·51·54·61·63·66·73·75·76·78·80] ➔ >:-5 =:-3 <:-6 \n",
      "      <:[4·10·12·16·22·24·30·35·36·45·47·48·49·54·55·59·60·70·74·75·76·78]⚖[6·7·9·11·17·20·21·23·26·27·29·33·50·52·53·58·65·66·67·71·73·79] ➔ \n",
      "         >:[8·24·26·31·36·51·54·78]⚖[7·19·38·39·50·52·70·74] ➔ >:-7 =:-11 <:-26 \n",
      "         =:[1·3·28·31·39·42·44·51·53]⚖[7·15·20·24·25·41·47·55·79] ➔ >:-15 =:-8 <:-1 \n",
      "         <:[1·9·11·13·14·15·17·19·22·23·25·27·31·34·37·38·41·45·53·54·56·60·62·63·64·65·67·70·71]⚖[2·3·4·8·16·24·32·33·35·36·39·40·43·44·46·49·51·52·58·59·61·66·68·72·73·74·75·78·80] ➔ >:-16 =:-12 <:-22\n"
     ]
    }
   ],
   "source": [
    "do(Puzzle(80, 4, {-1, 0}))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Looking good (except that the output is longer than the line length, and so is hard to read).\n",
    "\n",
    "# 5 Weighings\n",
    "\n",
    "With 5 weighings, 3<sup>5</sup> = 243, so I might be able to handle up to 121 lighter-or-heavier balls (242 possibilities), if I can make partitions of size 81 or less. Let's try:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "p5 = Puzzle(121, 5)\n",
    "do(p5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[80, 82, 80]"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "partition_sizes(p5, 40)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[82, 78, 82]"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "partition_sizes(p5, 41)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Nope, that didn't work. Let's back off to **120 balls, 5 weighings** for 2 &times; 120 + 1 = 241 possibilities:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40]⚖[81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120] ➔ \n",
      "   >:[2·3·5·8·10·18·21·26·34·35·36·37·47·51·52·53·59·62·66·69·72·74·76·77·82·85·92·99·102·106·107·110·112·113·115·116·117·119]⚖[6·7·11·15·17·20·23·25·27·29·31·39·40·42·49·50·54·57·60·64·70·79·80·84·86·88·89·90·91·93·96·97·98·100·104·105·109·114] ➔ \n",
      "      >:[5·11·17·18·21·22·26·27·28·29·30·33·37·39·41·43·44·47·48·51·54·57·58·64·69·71·74·75·76·84·88·89·91·94·100·106·108·109·118]⚖[1·2·6·8·9·12·14·15·16·20·25·31·32·34·42·45·46·50·53·56·62·63·72·77·78·80·81·82·83·87·90·93·95·96·97·99·101·107·116] ➔ \n",
      "         >:[2·5·6·8·13·16·17·19·20·28·29·33·34·35·38·40·41·43·44·45·47·53·54·55·56·63·64·67·68·76·82·83·86·91·94·96·97·98·100·102·103·104·107·109·110·113·115·119]⚖[3·4·7·10·14·18·23·27·31·32·39·46·49·50·57·58·59·60·61·62·65·69·71·72·73·74·75·78·79·80·81·84·85·88·89·90·92·93·95·99·101·105·106·108·111·112·116·120] ➔ \n",
      "            >:[3·12·30·41·63·65·66·83·90·91·97·118]⚖[33·37·56·60·64·69·93·101·102·112·115·120] ➔ >:-93 =:+5 <:-90 \n",
      "            =:[5·9·13·15·18·21·25·27·39·42·53·58·69·76·77·78·79·82·83·89·90·91·92·94·96·100·101·102·103·104·108·109·111·113·115·119]⚖[2·3·7·8·10·12·23·24·33·37·41·43·44·45·46·47·48·49·54·55·63·64·67·70·71·73·74·86·87·93·97·106·107·114·116·120] ➔ >:+21 =:+26 <:+37 \n",
      "            <:[2·4·23·26·37·40·42·43·45·46·49·50·52·53·54·65·66·67·78·84·87·91·96·100·102·103·107·115·118]⚖[5·6·9·12·13·14·17·24·30·32·33·36·41·47·69·71·76·86·89·92·94·97·101·109·110·111·112·113·114] ➔ >:-97 =:+18 <:-96 \n",
      "         =:[10·11·13·14·15·16·29·30·33·35·36·37·46·53·54·57·61·62·71·75·77·78·85·86·87·89·92·100·104·112·115·118·120]⚖[3·5·8·9·12·17·20·22·25·27·28·32·41·42·43·44·45·47·48·51·52·56·64·66·74·76·82·88·91·102·116·117·119] ➔ \n",
      "            >:[6·9·10·16·21·29·33·34·40·41·42·44·45·51·58·61·63·64·72·73·86·91·114]⚖[1·5·15·22·23·30·32·35·53·56·69·77·81·84·95·101·102·104·105·111·112·116·118] ➔ >:+10 =:+36 <:+35 \n",
      "            =:[4·8·13·14·15·18·29·32·36·37·44·53·57·66·70·71·72·74·82·83·84·87·88·89·92·98·100·101·108·110·111·113·117·118·120]⚖[1·3·6·7·11·16·19·22·25·26·34·38·40·42·43·48·58·60·61·67·68·73·76·78·91·93·96·99·104·106·107·112·114·115·116] ➔ >:-114 =:-105 <:-98 \n",
      "            <:[6·13·16·17·32·33·35·50·54·62·63·66·71·78·84·86·91·92·100·105·106·114·118]⚖[4·9·12·18·23·24·29·48·56·59·61·70·76·77·83·85·90·94·104·110·111·116·117] ➔ >:-104 =:+3 <:-86 \n",
      "         <:[1·4·9·14·15·19·21·24·26·31·36·49·51·52·55·57·58·59·62·64·65·74·75·76·78·81·83·92·93·94·96·97·99·100·101·102·103·104·105·109·111·112·115·117]⚖[2·3·5·7·10·11·12·16·23·29·30·32·35·39·40·41·42·43·44·45·46·48·56·60·66·68·71·72·77·79·80·82·84·85·87·88·89·90·95·106·110·113·116·119] ➔ \n",
      "            >:[5·20·75·78·82·84·97·99·100·114·116·120]⚖[2·34·44·46·50·57·59·63·73·77·89·110] ➔ >:-89 =:-88 <:-84 \n",
      "            =:[1·7·8·9·13·16·19·25·35·37·39·40·43·46·47·48·49·50·54·55·56·57·59·60·63·67·68·69·71·72·81·84·85·86·92·93·95·100·101·102·105·106·108·110·111·116·117·118]⚖[2·4·5·6·10·12·15·20·21·22·23·26·27·28·29·30·33·34·36·41·42·44·45·51·53·58·64·65·73·75·76·78·79·80·82·83·89·90·94·96·99·104·112·113·114·115·119·120] ➔ >:+8 =:-91 <:+34 \n",
      "            <:[2·3·13·15·16·27·28·37·50·52·62·69·70·89·90·94·99·101·103·106·109·111·114·116]⚖[5·6·17·18·21·24·33·40·47·51·57·58·60·65·73·77·80·82·97·104·105·107·110·119] ➔ >:+2 =:-100 <:-109 \n",
      "      =:[2·3·5·9·14·15·17·18·20·24·26·27·32·35·36·39·40·47·51·54·55·56·59·60·67·69·76·79·81·84·85·91·92·95·97·99·107·108·110·112·115·116·117·120]⚖[1·6·10·11·12·16·23·28·29·30·31·34·41·42·43·46·49·50·52·53·58·62·64·65·66·71·73·74·83·87·88·89·90·94·96·98·103·104·105·106·109·113·118·119] ➔ \n",
      "         >:[5·13·15·18·21·24·39·44·50·57·60·61·72·73·77·80·85·88·91·94·95·97·99·101·108·112·116·118]⚖[2·3·9·12·17·19·28·34·35·38·48·49·51·65·75·76·78·81·83·89·92·93·102·103·106·107·109·117] ➔ \n",
      "            >:[6·9·14·15·16·26·31·33·37·38·48·65·70·77·81·82·83·91·92·94·101·104·106·108·114·115·116·117·118·119]⚖[1·3·11·12·18·27·30·36·41·44·50·55·59·60·61·71·73·79·86·95·96·97·98·100·103·107·109·110·111·113] ➔ >:-103 =:+24 <:-83 \n",
      "            =:[1·2·4·11·12·13·21·22·23·25·28·30·37·43·44·46·47·48·51·54·55·59·66·71·72·74·80·86·89·90·91·92·93·96·100·102·106·115]⚖[5·6·8·9·17·20·24·26·29·31·32·33·38·39·50·57·58·63·65·68·69·76·77·81·82·84·85·87·95·97·98·104·105·108·110·113·114·120] ➔ >:-87 =:+14 <:+32 \n",
      "            <:[3·9·15·17·27·31·37·46·49·53·56·59·67·68·72·76·78·81·91·94·96·97·99·102·106·107·110·111·116·119]⚖[6·7·8·11·14·18·23·24·25·26·33·35·40·41·45·62·63·64·65·66·71·83·85·88·89·95·108·113·115·117] ➔ >:+9 =:-118 <:-94 \n",
      "         =:[2·20·22·38·39·40·52·56·63·67·69·80·83·84·90·101·102·105·106·107·111·118]⚖[1·5·11·12·14·24·26·33·34·35·43·44·45·49·51·65·68·74·79·91·110·113] ➔ \n",
      "            >:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22]⚖[99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120] ➔ >:+22 =:+38 <:0 \n",
      "            =:[8·11·15·19·24·25·28·29·33·37·49·54·57·66·68·70·72·85·91·96·97·98·99·103·107·109·112·113·116]⚖[3·5·13·20·21·23·27·39·40·45·46·51·61·62·63·67·76·79·80·82·84·100·104·105·106·115·118·119·120] ➔ >:+19 =:+4 <:+13 \n",
      "            <:[1·2·6·7·9·10·11·16·19·23·25·28·32·38·50·53·54·58·61·63·64·65·67·69·72·73·74·76·77·80·81·86·90·94·95·96·97·98·99·100·103·105·106·107·116·118·120]⚖[3·4·5·8·12·14·15·17·18·20·21·26·27·29·30·31·33·35·36·41·43·46·48·49·51·52·56·60·62·70·71·78·84·87·88·89·91·92·93·102·108·109·111·114·115·117·119] ➔ >:-111 =:-101 <:+33 \n",
      "         <:[10·16·19·20·42·43·44·45·56·57·63·64·66·75·79·80·84·92·95·101·104·106·108·110·117]⚖[1·17·18·22·25·26·31·36·40·55·61·70·74·76·78·81·83·86·90·91·97·102·111·113·120] ➔ \n",
      "            >:[10·11·17·18·25·26·27·34·58·65·72·77·82·84·85·88·89·98·108·117·118]⚖[4·16·22·33·35·40·42·47·49·52·70·71·73·74·78·90·92·96·103·104·120] ➔ >:-120 =:-81 <:+16 \n",
      "            =:[3·5·7·8·9·10·11·20·25·28·35·36·41·48·50·51·54·56·57·63·65·67·68·73·77·78·80·81·82·83·84·87·90·91·96·102·107·114·117]⚖[6·12·17·22·23·24·27·29·32·33·34·37·42·44·46·49·53·58·62·64·69·70·71·75·76·85·86·88·95·97·98·101·104·108·109·111·112·115·119] ➔ >:+28 =:+30 <:+12 \n",
      "            <:[1·2·5·7·8·9·10·12·15·22·23·25·28·30·33·39·47·61·67·73·74·75·78·82·84·89·102·108·110·114·117·118]⚖[4·6·11·18·20·24·27·29·38·41·42·43·44·46·49·52·62·66·70·81·83·85·86·91·92·93·101·104·107·112·113·116] ➔ >:+1 =:-95 <:-108 \n",
      "      <:[1·7·8·10·11·12·13·14·21·23·26·30·33·34·38·45·46·54·56·63·67·69·74·76·77·78·79·80·81·85·96·100·102·106·107·108·111·113·114·117·118]⚖[3·4·5·6·9·19·22·24·27·36·37·40·41·43·44·47·50·55·57·58·59·61·62·64·71·72·73·75·82·84·91·92·93·94·95·98·101·110·112·115·116] ➔ \n",
      "         >:[3·6·7·8·12·13·15·18·19·23·29·30·33·39·43·46·55·59·73·77·83·85·91·92·103·109·111·113·115]⚖[11·14·20·21·22·24·27·37·38·40·41·42·53·54·56·58·60·63·65·66·74·79·80·86·90·94·102·105·112] ➔ \n",
      "            >:[1·7·14·19·20·34·43·52·54·65·83·96·99·101·104·107·111·114]⚖[11·12·23·31·59·62·64·66·72·77·78·79·87·90·91·97·98·119] ➔ >:+7 =:-112 <:+23 \n",
      "            =:[5·7·11·13·27·40·62·69·70·82·105]⚖[32·41·53·54·59·94·96·100·104·108·110] ➔ >:-110 =:-116 <:-82 \n",
      "            <:[2·5·13·14·20·24·26·29·36·37·38·40·41·45·58·59·64·65·71·78·79·81·90·93·94·97·104·115·116]⚖[1·3·4·7·9·15·16·23·27·47·48·49·50·53·55·57·61·69·74·80·88·92·98·99·100·101·108·114·119] ➔ >:-92 =:+11 <:-115 \n",
      "         =:[4·9·10·14·16·22·23·26·31·32·35·40·42·45·47·56·57·62·63·66·67·74·78·82·85·87·90·95·97·107·109·112·114·116·117]⚖[3·6·11·21·25·27·29·30·33·34·38·39·41·46·51·53·61·64·65·72·76·77·79·86·89·91·92·93·99·100·101·105·108·110·119] ➔ \n",
      "            >:[2·10·12·15·16·22·26·29·31·32·36·38·45·48·53·59·64·65·66·68·69·72·87·89·90·93·94·98·99·106·108·109·110]⚖[1·3·5·7·8·13·18·20·21·23·34·35·47·49·51·56·58·63·67·70·74·78·82·86·97·100·102·104·111·114·115·117·118] ➔ >:+31 =:-119 <:-99 \n",
      "            =:[2·3·5·6·8·9·10·12·13·14·16·17·18·19·23·24·26·29·31·33·34·35·38·40·41·46·47·49·50·52·58·60·62·66·67·71·75·77·78·83·86·87·88·96·102·107·108·109·110·112·116·118·120]⚖[1·4·7·11·15·21·22·25·27·30·37·39·42·43·44·45·48·53·54·55·56·59·64·65·69·72·73·74·76·79·80·81·82·84·85·89·90·91·94·95·97·98·99·100·103·104·105·106·111·113·114·115·117] ➔ >:+17 =:+20 <:+15 \n",
      "            <:[3·6·11·13·19·24·26·39·41·43·45·47·51·53·56·78·83·93·94·101·103·109·114·120]⚖[2·4·5·7·18·25·32·33·42·49·50·52·61·62·76·82·97·100·102·108·111·112·115·116] ➔ >:+39 =:+29 <:+25 \n",
      "         <:[1·2·4·7·11·16·17·19·20·21·22·30·32·33·35·36·49·51·52·56·58·59·62·68·71·75·76·84·85·86·88·89·92·94·95·103·104·105·107·114]⚖[3·5·8·9·15·24·25·26·28·29·31·40·42·45·46·48·53·60·63·64·65·66·74·77·79·81·82·87·91·96·98·101·102·106·110·111·112·117·118·120] ➔ \n",
      "            >:[2·4·5·6·8·10·21·25·26·27·30·34·36·42·43·48·58·59·64·72·75·81·83·95·99·102·104·105·108·113·119]⚖[16·20·28·29·32·33·35·38·39·40·41·45·49·50·54·55·60·62·63·65·74·79·82·90·98·103·109·110·115·117·120] ➔ >:-117 =:-106 <:-102 \n",
      "            =:[1·3·5·9·11·12·14·15·18·20·22·23·30·31·32·33·35·38·39·41·44·46·49·50·53·54·59·61·63·64·65·75·76·79·80·81·87·89·90·91·92·94·95·99·101·102·103·104·105·111·116·118]⚖[2·4·8·13·17·19·21·24·25·26·27·28·29·34·37·40·42·45·47·48·51·52·55·56·57·67·68·70·71·72·73·74·77·82·83·84·85·86·88·93·96·98·106·107·108·109·110·112·113·114·119·120] ➔ >:-113 =:+6 <:+27 \n",
      "            <:[19·22·23·31·35·36·37·47·48·52·53·57·62·65·66·68·71·73·79·89·93·95·112·117·118]⚖[2·3·6·11·17·20·24·33·38·40·41·42·43·54·72·84·87·92·100·102·103·104·105·107·109] ➔ >:-107 =:-85 <:+40 \n",
      "   =:[5·9·10·11·13·16·23·34·35·36·37·39·45·50·52·54·57·59·60·62·63·67·71·78·79·87·92·95·98·101·105·106·109·110·114·115·117·118]⚖[2·7·8·12·15·18·19·22·25·28·33·41·42·43·44·47·51·55·56·64·70·72·73·75·77·84·88·91·96·99·102·103·107·108·111·112·119·120] ➔ \n",
      "      >:[1·5·6·7·11·36·39·40·44·47·49·61·62·63·64·66·69·76·77·78·83·87·89·91·92·93·95·96·99·100·110·111·119]⚖[4·10·16·19·22·26·30·34·37·41·42·45·46·51·52·53·56·67·71·73·75·79·88·94·98·102·104·107·108·109·113·114·117] ➔ \n",
      "         >:[8·11·14·16·19·20·34·35·36·37·40·43·45·46·48·51·52·55·56·59·65·67·69·76·84·91·93·94·96·97·102·103·106·113·117·118]⚖[1·2·3·4·9·22·23·33·38·39·41·42·47·50·53·58·66·71·73·74·78·80·81·86·87·95·101·104·105·109·111·112·114·116·119·120] ➔ \n",
      "            >:[14·18·23·26·30·32·33·42·44·46·48·49·58·59·68·74·83·87·91·92·93·97·99·101·102·111·119]⚖[3·6·8·10·15·16·19·25·31·37·39·41·51·52·55·60·64·71·82·86·88·89·94·98·103·109·116] ➔ >:-41 =:-73 <:-42 \n",
      "            =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53·54·55·56·57·58]⚖[63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120] ➔ >:-75 =:+62 <:+63 \n",
      "            <:[6·8·10·32·36·41·44·47·51·58·60·61·62·65·66·74·77·87·90·95·106·109·119·120]⚖[4·5·13·15·18·19·26·46·53·56·57·70·72·73·84·86·89·91·94·98·103·112·114·117] ➔ >:-56 =:+78 <:-51 \n",
      "         =:[11·45·50·55·56·59·72·76·87·89·96·110·118]⚖[4·8·25·30·32·46·60·67·70·85·95·109·120] ➔ \n",
      "            >:[3·4·6·8·13·14·15·19·20·21·25·26·27·34·37·44·46·50·53·62·63·64·66·67·69·70·71·74·75·83·87·89·92·93·95·100·103·105·108·114·116·117·119]⚖[9·10·11·12·16·22·23·24·28·29·30·31·33·36·38·41·42·47·51·56·57·60·65·68·79·81·82·84·88·90·97·98·102·104·106·107·109·110·112·113·115·118·120] ➔ >:+50 =:+59 <:-70 \n",
      "            =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53·54]⚖[67·68·69·70·71·72·73·74·75·76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120] ➔ >:+54 =:+57 <:-43 \n",
      "            <:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53·54·55]⚖[66·67·68·69·70·71·72·73·74·75·76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120] ➔ >:-72 =:+60 <:-55 \n",
      "         <:[3·9·11·13·21·22·23·24·31·34·39·41·42·46·47·48·52·55·57·74·75·76·80·82·84·85·92·97·107·108·109·112]⚖[2·5·6·10·20·26·33·35·40·44·45·49·56·58·59·68·70·72·77·79·81·86·91·98·102·106·110·111·114·116·117·120] ➔ \n",
      "            >:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44]⚖[77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120] ➔ >:-77 =:+52 <:-44 \n",
      "            =:[1·2·4·5·6·9·11·14·16·18·20·22·27·28·30·31·32·34·36·38·41·46·47·49·55·56·57·64·70·71·72·74·75·78·85·86·88·89·91·92·96·98·99·100·101·103·104·105·110·111·114·116·117·120]⚖[3·7·8·10·12·13·15·17·19·21·23·24·25·29·33·35·37·39·40·42·43·44·51·52·53·54·58·59·61·62·63·65·66·68·69·73·76·77·79·80·81·83·84·93·95·97·102·106·107·109·112·113·115·119] ➔ >:+71 =:+67 <:-64 \n",
      "            <:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45]⚖[76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120] ➔ >:+45 =:-47 <:+79 \n",
      "      =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53]⚖[68·69·70·71·72·73·74·75·76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120] ➔ \n",
      "         >:[1·5·9·11·12·20·21·22·25·27·28·29·31·32·37·38·39·42·44·48·52·56·57·62·63·66·68·73·85·86·88·92·94·98·100·101·108·111·115·116·117·119]⚖[2·3·4·6·8·10·14·16·19·23·24·30·34·36·43·45·49·51·53·54·59·61·69·70·72·74·77·82·83·84·89·91·95·96·97·99·103·106·109·110·112·120] ➔ \n",
      "            >:[3·8·15·17·18·19·24·26·28·29·30·34·35·39·43·45·46·47·49·51·53·54·57·59·63·65·69·70·72·73·75·76·77·80·81·82·86·87·88·89·92·95·101·103·109·117·119·120]⚖[1·4·5·6·7·9·10·11·12·14·16·20·32·33·36·37·38·40·41·44·50·55·56·58·60·62·66·67·71·74·78·83·84·85·90·91·94·96·97·98·99·102·106·110·112·114·115·118] ➔ >:-74 =:+48 <:-69 \n",
      "            =:[7·14·17·21·23·25·26·31·46·65·75·80·86·90·110·112·114]⚖[28·32·36·37·42·50·57·59·84·85·89·93·100·117·118·119·120] ➔ >:+46 =:-76 <:-80 \n",
      "            <:[18·22·29·35·38·43·44·47·49·51·55·69·73·74·85·92·94·95·103·108·109·112·113·117]⚖[2·4·14·16·20·24·26·27·28·30·33·41·53·57·61·63·72·78·80·83·87·99·101·120] ➔ >:+49 =:-68 <:+53 \n",
      "         =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53·54·55·56·57·58]⚖[63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120] ➔ \n",
      "            >:[1·5·9·10·15·18·20·23·26·28·31·34·37·38·41·43·44·46·47·49·52·53·58·61·63·66·71·78·87·95·100·106·107·111·112·115]⚖[3·4·6·13·14·24·25·27·32·39·40·42·45·50·51·56·57·60·64·68·72·77·80·90·91·92·94·97·98·99·101·103·105·110·116·119] ➔ >:+58 =:-65 <:-66 \n",
      "            =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53·54·55·56·57·58·59·60]⚖[61·62·63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120] ➔ >:-61 =:0 <:+61 \n",
      "            <:[5·6·10·14·15·16·17·20·21·23·28·30·32·33·34·40·42·45·46·49·50·55·56·58·63·64·66·67·72·77·78·79·81·86·95·96·97·99·103·110·111·113·114·115·119]⚖[1·3·9·11·18·19·22·25·26·27·31·35·36·37·38·39·41·43·47·51·52·59·61·62·68·69·73·82·83·87·88·89·90·94·98·100·102·105·106·107·108·109·112·117·118] ➔ >:+66 =:+65 <:-58 \n",
      "         <:[2·6·8·9·15·16·17·18·23·26·27·30·33·36·37·40·41·49·53·56·60·69·70·73·74·76·79·84·86·87·96·101·102·104·105·106·109·110·112·115·117·120]⚖[1·3·4·10·12·14·24·29·31·34·38·39·44·47·50·51·52·54·57·58·62·63·64·66·68·71·72·75·77·78·81·82·88·89·90·92·95·99·100·111·113·119] ➔ \n",
      "            >:[2·7·8·9·10·14·16·17·18·19·22·23·31·40·41·46·51·53·58·68·72·74·75·88·89·93·97·103·106·107·111·117]⚖[6·15·20·26·29·33·35·36·37·42·43·55·65·66·70·73·76·77·85·86·87·90·91·92·96·98·102·109·110·113·116·118] ➔ >:+74 =:+69 <:+76 \n",
      "            =:[1·5·8·9·11·12·13·18·25·33·35·36·37·40·42·43·44·50·52·56·59·69·71·73·74·76·85·97·99·103·104·105·108·111·113·115]⚖[2·6·19·20·29·30·31·32·34·38·39·41·45·46·54·55·65·66·67·72·79·80·82·86·87·92·93·95·98·100·101·106·107·109·110·116] ➔ >:-46 =:-48 <:+80 \n",
      "            <:[2·3·5·6·7·12·20·25·31·34·35·52·53·55·60·62·65·69·71·72·74·82·85·86·98·102·104·109·115·117·120]⚖[1·4·13·17·18·21·23·29·40·41·43·46·47·48·49·54·59·63·67·76·78·90·91·92·93·97·105·107·110·111·119] ➔ >:-49 =:+68 <:-53 \n",
      "      <:[4·6·7·8·10·15·19·20·24·27·30·33·36·37·40·41·45·48·49·51·53·54·56·57·69·76·78·79·80·82·84·87·88·91·92·93·94·95·102·103·109·110·111·115·118·120]⚖[1·2·3·9·11·13·17·21·22·23·25·26·32·34·35·38·39·43·44·46·52·58·59·60·61·62·63·64·65·66·67·72·81·83·85·89·97·99·100·101·106·108·112·114·116·119] ➔ \n",
      "         >:[2·3·7·9·10·11·18·19·24·28·31·32·41·47·51·54·59·63·65·66·67·68·74·76·78·80·81·86·93·94·95·100·102·104·106·110·116·118]⚖[1·6·8·12·14·15·16·20·23·26·27·29·33·34·35·37·39·46·58·60·69·71·73·89·91·92·96·97·98·99·101·107·108·109·112·114·117·120] ➔ \n",
      "            >:[12·14·72·86·96]⚖[41·60·77·84·88] ➔ >:-60 =:+51 <:+41 \n",
      "            =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53·54·55·56]⚖[65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120] ➔ >:+56 =:-62 <:-52 \n",
      "            <:[3·6·15·19·20·22·23·25·26·28·32·35·36·40·44·45·54·55·56·62·63·64·68·71·73·74·77·80·82·83·87·92·98·102·103·112·115·117·118·119]⚖[1·5·11·12·16·17·21·24·33·34·38·41·43·46·47·50·51·52·53·57·59·60·61·66·69·76·78·79·81·84·88·91·100·105·106·108·109·113·114·120] ➔ >:-59 =:-67 <:-63 \n",
      "         =:[4·7·8·10·16·17·25·26·28·29·30·32·35·39·41·44·45·46·48·52·58·63·65·66·67·72·77·79·83·85·90·93·98·101·104·105·108·110·112·113·114·117·120]⚖[3·5·9·11·13·14·15·18·20·21·24·27·34·37·38·40·42·47·50·57·61·64·68·69·70·71·74·76·80·82·84·86·87·88·89·92·95·99·100·102·107·111·118] ➔ \n",
      "            >:[4·5·6·8·10·14·19·23·28·31·32·36·37·38·39·42·46·55·56·57·63·67·69·72·75·78·81·83·84·90·91·96·97·101·103·105·112·114·116·119]⚖[1·9·11·13·15·18·24·26·27·29·30·34·35·41·44·45·52·54·59·65·66·68·71·77·80·82·86·87·88·92·93·94·98·100·102·107·110·113·118·120] ➔ >:-71 =:-50 <:+77 \n",
      "            =:[1·5·6·15·16·18·20·23·25·32·34·35·41·42·48·51·55·58·62·63·66·67·74·77·80·82·93·95·97·99·104·112·117·118·119]⚖[3·8·9·10·11·12·19·29·36·37·38·43·44·46·53·54·56·60·64·65·70·71·75·76·83·91·94·96·98·100·101·107·108·110·120] ➔ >:+55 =:+73 <:+75 \n",
      "            <:[2·3·6·7·9·12·14·17·18·19·23·24·25·26·29·34·35·36·38·39·40·42·46·48·50·57·59·60·65·68·71·72·75·76·80·81·82·85·90·92·98·101·102·108·114·116]⚖[1·4·10·15·16·20·22·30·31·32·33·41·43·44·45·49·51·53·54·56·58·61·62·63·70·74·78·83·86·87·88·89·91·93·94·96·97·100·103·104·107·113·115·118·119·120] ➔ >:+42 =:+47 <:+70 \n",
      "         <:[4·12·13·16·22·25·26·30·33·39·42·43·47·48·52·54·61·72·74·78·82·107·117·119]⚖[5·17·18·20·21·29·32·40·44·46·55·73·79·89·91·95·97·100·101·102·106·108·113·118] ➔ \n",
      "            >:[2·4·6·8·10·13·16·17·19·24·25·26·37·39·40·45·46·47·52·54·57·59·66·67·72·79·82·83·85·91·94·96·97·98·102·104·106·113·115·119]⚖[3·9·12·14·15·18·20·22·27·28·32·33·35·41·44·50·53·55·60·62·63·68·69·70·74·76·78·81·84·88·92·93·99·101·103·109·110·112·114·116] ➔ >:+72 =:+43 <:-79 \n",
      "            =:[16·21·34·45·47·51·60·63·69·86·88·91·98·105·106]⚖[5·20·22·46·55·57·70·73·76·77·92·93·95·101·102] ➔ >:-57 =:+64 <:-45 \n",
      "            <:[12·15·18·23·27·28·29·42·43·44·48·51·53·54·55·57·68·71·91·94·95·97·98·104·107]⚖[4·25·30·32·34·37·38·40·52·59·63·65·67·70·73·75·79·81·83·99·102·103·108·110·114] ➔ >:+44 =:-78 <:-54 \n",
      "   <:[6·8·11·18·20·24·25·28·34·35·37·41·42·46·48·51·57·63·64·66·67·68·70·75·79·81·82·86·87·89·93·94·96·97·102·104·105·106·113·120]⚖[2·3·4·7·10·12·14·21·22·23·33·43·44·45·49·52·53·54·59·62·69·71·72·74·83·84·85·90·92·95·98·99·100·108·110·112·114·116·117·118] ➔ \n",
      "      >:[3·8·10·11·12·15·18·23·26·28·31·33·41·43·67·72·78·79·80·86·87·88·90·91·96·98·101·103·105·106·108·109·112·120]⚖[4·5·20·21·34·35·37·39·40·42·45·46·48·51·52·53·56·58·60·61·62·70·71·74·77·82·83·85·97·99·102·113·116·117] ➔ \n",
      "         >:[8·14·16·18·19·29·36·49·51·58·59·67·71·77·79·80·82·88·95·100·104·112·118]⚖[4·5·13·15·20·21·23·25·34·40·43·56·64·81·86·98·105·106·109·110·111·113·116] ➔ \n",
      "            >:[1·2·3·4]⚖[117·118·119·120] ➔ >:0 =:-21 <:-4 \n",
      "            =:[2·6·7·8·11·12·14·17·19·21·26·28·31·32·33·36·38·40·42·43·47·49·53·54·55·64·65·67·69·71·73·75·79·80·83·85·87·90·92·95·97·98·102·104·108·116]⚖[1·3·4·5·9·10·18·22·23·25·30·34·35·37·39·41·45·50·60·61·68·74·76·77·81·82·84·86·88·89·91·94·96·99·100·101·105·107·109·111·112·113·114·115·117·118] ➔ >:+87 =:+120 <:+96 \n",
      "            <:[3·5·7·15·28·32·40·52·54·62·68·70·72·74·75·86·89·100·101·112·114·115·118·119]⚖[1·16·19·21·22·30·41·44·50·53·55·61·64·67·77·78·87·90·91·92·96·105·108·110] ➔ >:+86 =:+106 <:+105 \n",
      "         =:[2·3·5·14·15·23·27·29·33·37·39·49·51·55·57·58·62·66·69·70·74·78·81·84·86·98·105·117·118·119]⚖[4·7·9·10·11·22·28·35·36·40·45·46·47·54·56·59·60·64·68·71·80·82·91·92·93·95·103·108·115·116] ➔ \n",
      "            >:[2·8·16·20·22·27·28·30·36·58·66·80·81·88·94·96·120]⚖[1·3·4·10·12·13·39·42·43·45·48·52·71·78·93·104·106] ➔ >:+81 =:-7 <:-22 \n",
      "            =:[1·2·6·10·14·15·18·21·26·27·28·29·30·32·33·35·36·38·40·44·45·46·47·49·50·52·56·57·58·60·63·69·70·71·73·74·77·78·80·82·83·87·88·93·99·100·104·109·110·112·115·116·117·119]⚖[3·4·5·7·8·9·11·12·13·16·17·19·22·23·24·25·31·34·39·41·42·48·51·53·54·59·61·62·64·66·67·68·72·75·76·79·81·90·91·92·94·95·96·97·98·102·103·106·107·108·111·113·114·120] ➔ >:+104 =:+89 <:+94 \n",
      "            <:[2·15·22·25·31·32·34·35·40·41·42·43·52·66·67·68·70·71·73·76·81·82·86·89·93·94·98·100·102·104·109·111]⚖[3·5·6·7·10·18·19·37·39·44·46·53·54·56·57·59·61·63·65·74·80·83·84·87·96·97·101·106·108·117·118·119] ➔ >:+93 =:-14 <:-2 \n",
      "         <:[7·16·22·25·31·35·38·39·44·45·46·49·50·53·54·55·58·60·65·72·78·79·85·90·91·97·99·103·107·109·111·115·116]⚖[1·12·14·15·17·18·20·21·23·24·29·32·41·42·47·48·52·57·59·63·64·71·73·82·83·89·98·101·102·105·113·114·118] ➔ \n",
      "            >:[12·18·21·29·34·43·56·57·58·65·66·67·69·73·79·82·95·97·98·100·104·107·108·110·111·112·115·117·118]⚖[2·3·4·16·17·20·22·25·27·36·39·47·55·60·70·72·75·77·78·80·81·86·87·89·91·103·105·113·116] ➔ >:+97 =:-23 <:-12 \n",
      "            =:[1·2·10·11·14·17·21·22·31·38·40·42·46·47·50·62·63·64·65·68·70·71·74·75·81·82·85·86·87·89·94·97·98·99·100·101·105·107·109·110·113·118·119]⚖[4·6·7·8·12·23·24·28·29·33·35·37·39·41·43·48·52·55·56·57·59·61·66·67·69·72·76·78·79·84·90·92·93·96·103·104·106·108·111·112·114·115·120] ➔ >:-33 =:-3 <:-10 \n",
      "            <:[1·3·4·5·9·10·14·15·17·20·21·23·24·29·33·39·40·45·46·51·56·63·66·70·72·74·75·76·78·79·84·87·89·91·94·96·99·101·104·112·113·114·116·118]⚖[2·6·12·13·19·22·26·30·31·32·34·35·37·41·43·50·53·54·57·58·59·60·61·62·67·68·71·80·83·90·92·93·95·100·102·103·105·106·107·109·110·117·119·120] ➔ >:+113 =:+82 <:+102 \n",
      "      =:[2·5·7·8·9·12·15·19·20·24·30·38·41·44·45·51·53·55·56·60·64·66·69·70·71·74·78·81·85·94·98·102·108·109·112·113·115·116·118·119]⚖[3·4·10·13·14·16·21·22·23·25·26·27·28·29·35·40·46·57·58·62·67·73·75·76·82·83·84·86·87·89·91·92·93·95·96·101·106·111·117·120] ➔ \n",
      "         >:[1·3·4·5·6·15·26·29·33·35·37·41·42·44·45·47·52·57·58·64·66·67·68·69·72·75·76·79·80·83·84·86·87·88·92·95·97·98·101·107·108·109·110·111·112]⚖[2·7·8·9·10·12·13·16·17·19·20·24·25·30·31·38·39·43·49·53·54·55·56·59·63·65·71·73·74·77·81·82·90·91·93·94·99·100·102·103·105·106·117·119·120] ➔ \n",
      "            >:[1·2·3·4·6·7·9·13·17·18·19·20·22·23·26·27·31·35·36·38·41·44·45·50·56·60·61·62·66·69·72·75·76·77·81·82·86·89·93·96·98·99·100·102·105·106·107·109·110·113·115·118]⚖[5·8·10·11·12·14·15·24·25·28·29·30·32·33·37·40·42·43·47·48·49·51·54·55·57·58·59·63·65·67·68·71·73·79·80·84·85·87·88·90·91·95·97·101·103·104·108·111·112·114·119·120] ➔ >:+109 =:-16 <:-13 \n",
      "            =:[2·3·6·14·15·16·22·23·24·28·31·33·39·40·43·47·49·50·51·54·57·63·65·66·68·71·74·83·85·87·88·93·96·100·111·112·115·120]⚖[1·4·9·12·13·18·20·26·32·36·38·42·48·55·56·60·61·62·67·70·73·75·76·78·79·84·86·90·91·92·95·97·102·103·107·110·113·118] ➔ >:+115 =:-27 <:-40 \n",
      "            <:[2·4·6·7·10·11·13·14·17·18·19·20·24·28·30·36·37·40·41·42·49·50·51·56·61·64·66·68·69·76·77·78·83·88·91·94·100·103·104·105·106·108·115]⚖[1·3·8·9·12·16·21·25·26·31·32·43·45·47·52·55·58·62·65·70·71·74·75·80·84·86·87·89·90·92·93·96·98·101·110·111·112·114·116·117·118·119·120] ➔ >:-26 =:-29 <:+119 \n",
      "         =:[1·4·5·13·14·17·19·22·28·30·31·35·38·40·43·44·45·46·51·54·59·60·61·62·69·76·77·78·80·83·85·86·88·89·94·97·99·109·110·112·113·114·119]⚖[9·10·11·15·18·20·21·23·24·25·26·27·29·32·37·39·41·47·48·49·50·57·58·65·67·68·71·73·79·82·87·90·93·95·96·100·101·102·104·105·116·118·120] ➔ \n",
      "            >:[1·11·16·26·30·34·40·42·46·60·81·101·116]⚖[23·31·39·48·59·61·62·70·88·106·109·112·114] ➔ >:-39 =:-32 <:+88 \n",
      "            =:[1·7·10·22·30·35·36·37·44·45·50·53·56·61·68·82·85·89·93·100·103·105·106·109·119]⚖[4·6·13·18·21·31·32·38·39·42·47·48·49·55·57·72·76·80·83·87·88·95·97·99·112] ➔ >:+103 =:+107 <:-36 \n",
      "            <:[2·3·4·6·8·9·10·11·14·16·17·18·21·26·32·34·40·43·44·46·51·55·57·59·61·62·65·74·75·76·77·79·80·81·83·85·86·88·90·91·97·98·101·102·104·106·107·109·110·112·114·115·117·118]⚖[5·7·13·19·20·22·23·24·27·28·30·31·33·35·36·37·38·39·41·42·45·47·48·49·52·53·54·56·64·67·68·70·71·72·73·78·82·84·87·89·92·93·94·95·96·99·100·103·105·111·113·116·119·120] ➔ >:-31 =:-1 <:-17 \n",
      "         <:[3·4·8·9·10·13·16·18·20·21·29·32·34·37·40·47·48·49·57·66·68·71·72·73·74·75·79·80·86·88·89·90·92·93·98·99·100·101·102·104·107·109·110·113·114·116·119]⚖[1·2·6·12·14·17·19·22·23·24·25·27·28·30·33·35·36·39·42·43·45·55·56·58·60·61·62·63·64·65·67·69·76·78·81·84·85·87·91·94·95·103·108·111·112·115·118] ➔ \n",
      "            >:[4·5·7·11·13·15·18·26·30·32·33·34·35·36·37·39·42·43·44·45·46·51·53·56·57·59·60·61·62·66·70·71·72·76·77·78·81·83·84·87·89·90·91·92·95·96·101·102·104·108·109·110·112·116·117·120]⚖[1·2·6·8·9·10·12·14·16·17·21·22·27·28·29·31·38·40·41·47·48·49·50·54·55·58·63·64·67·68·69·73·74·75·79·80·82·85·86·88·93·94·97·98·99·100·103·105·106·107·111·113·114·115·118·119] ➔ >:+101 =:-19 <:-30 \n",
      "            =:[6·14·16·20·22·30·31·36·37·38·40·41·44·45·48·49·50·54·58·59·60·62·67·68·71·74·75·79·82·84·85·90·91·97·101·102·104·107·110·112·113·118·119]⚖[2·3·5·7·9·10·17·25·26·27·28·29·33·39·42·43·46·51·53·61·65·69·72·73·76·80·81·86·87·89·93·94·98·99·100·103·106·111·114·115·116·117·120] ➔ >:-5 =:-15 <:-38 \n",
      "            <:[8·9·13·17·18·20·26·38·43·46·49·50·51·59·66·74·81·84·85·90·91·92·93·95·103·112]⚖[10·14·24·25·32·36·37·42·47·48·52·53·55·57·61·67·68·75·77·88·98·99·102·108·114·116] ➔ >:+91 =:+111 <:-9 \n",
      "      <:[1·3·11·12·19·20·21·22·26·28·45·47·49·51·53·56·57·58·62·69·70·71·72·77·78·82·84·86·88·89·97·106·109·111·112·117·118]⚖[2·4·6·8·10·16·17·18·27·34·35·38·40·42·44·46·55·61·64·65·74·80·81·83·87·91·92·93·98·102·103·105·110·113·114·115·116] ➔ \n",
      "         >:[4·5·11·13·14·16·17·21·22·23·24·25·27·28·33·34·40·41·51·53·55·60·61·66·72·74·77·80·82·91·102·107·109·110·115·118·119]⚖[1·2·6·7·12·19·35·43·44·47·48·49·58·59·62·63·65·68·69·75·89·90·92·93·94·96·97·98·99·101·104·106·112·113·116·117·120] ➔ \n",
      "            >:[1·6·8·15·16·19·22·26·28·32·33·34·39·40·41·46·48·49·51·53·55·67·68·70·72·79·81·84·87·91·95·96·98·103·110·113·114·115·116·117·119·120]⚖[3·5·7·10·11·12·14·17·18·21·24·25·27·30·35·36·38·44·45·47·50·58·60·64·65·69·71·73·74·77·83·85·88·90·93·97·100·101·104·105·107·109] ➔ >:-35 =:+118 <:-6 \n",
      "            =:[5·6·15·19·21·22·26·27·28·30·33·35·37·40·45·51·53·54·56·57·62·64·70·82·85·104·116·117]⚖[4·8·9·12·32·39·42·49·60·68·69·71·72·75·76·78·84·89·94·96·97·98·101·102·111·113·114·119] ➔ >:-8 =:-18 <:+84 \n",
      "            <:[15·25·38·43·46·47·48·49·50·51·52·55·58·61·68·69·72·83·85·88·92·95·101·105·106·107·109·110·115]⚖[2·6·7·9·10·12·13·14·17·20·21·30·32·34·36·39·42·56·63·67·71·76·79·89·93·102·108·112·119] ➔ >:-34 =:+117 <:+112 \n",
      "         =:[1·2·4·5·6·8·9·10·11·13·18·25·35·39·42·45·48·49·51·56·57·58·59·60·73·76·79·81·83·86·88·90·95·96·104·115·116·117·119]⚖[7·12·14·19·21·24·26·27·29·32·36·38·40·41·44·46·50·52·53·55·61·63·64·66·67·69·70·71·74·80·85·92·93·94·99·102·112·113·118] ➔ \n",
      "            >:[5·6·7·8·12·13·17·27·30·35·43·45·50·56·57·60·61·62·70·73·74·76·78·79·83·88·89·96·100·101·106·108·111·116·117]⚖[1·3·9·10·15·18·21·23·24·25·26·28·33·34·36·37·54·63·65·66·67·71·72·84·90·91·93·94·97·98·109·110·112·113·114] ➔ >:-24 =:+95 <:+90 \n",
      "            =:[2·5·7·10·12·13·14·17·24·25·26·27·29·30·32·33·34·35·36·37·41·42·49·52·53·57·59·63·65·68·70·72·73·74·81·83·84·85·86·88·89·90·91·94·95·96·99·105·108·111·112·113·118]⚖[1·3·4·6·8·9·11·15·16·18·20·21·22·23·28·31·38·39·40·44·45·46·47·50·51·54·55·62·64·66·67·69·71·75·76·77·78·79·80·87·93·98·101·102·103·104·106·107·109·110·114·117·119] ➔ >:+108 =:+100 <:-37 \n",
      "            <:[7·8·15·16·28·30·32·37·46·50·55·58·59·60·62·65·66·68·69·71·76·83·84·85·88·91·93·94·95·101·112·115·120]⚖[1·2·3·4·12·17·21·22·29·33·40·43·44·45·51·54·56·63·67·72·74·75·77·78·79·82·89·98·99·105·110·116·119] ➔ >:+85 =:-25 <:+99 \n",
      "         <:[1·2·3·5·6·11·13·18·19·26·27·31·35·36·42·67·76·83·91·94·95·105·106·108·110·112·115]⚖[10·12·15·20·24·25·29·43·45·47·51·59·63·64·68·74·75·78·98·99·101·102·104·111·113·114·119] ➔ \n",
      "            >:[11·15·16·23·27·71·89·114]⚖[13·19·20·22·48·101·109·110] ➔ >:-20 =:+83 <:+110 \n",
      "            =:[5·6·9·13·16·18·20·23·24·25·26·28·29·30·31·34·35·38·43·44·47·54·55·61·73·74·75·76·78·79·80·82·84·85·86·92·96·99·100·102·105·108·110·111·117·120]⚖[1·3·4·7·8·10·11·12·14·15·19·27·32·33·36·42·45·46·48·49·50·52·53·56·57·59·60·62·64·67·68·70·71·81·87·89·90·91·93·94·97·106·107·112·114·115] ➔ >:+92 =:+116 <:-28 \n",
      "            <:[3·7·11·13·15·21·35·36·40·60·87·95·98·103·110·112·116·120]⚖[1·2·4·8·10·29·37·55·59·61·70·74·75·76·91·100·101·113] ➔ >:+98 =:+114 <:-11\n"
     ]
    }
   ],
   "source": [
    "do(Puzzle(120, 5, {-1, 0, +1}))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "That works.\n",
    "\n",
    "Or, I could solve a puzzle with 243 possibilites (the maximum possible): **242 balls**, lighter-only, plus the possibility that no ball is odd:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53·54·55·56·57·58·59·60·61·62·63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80·81]⚖[162·163·164·165·166·167·168·169·170·171·172·173·174·175·176·177·178·179·180·181·182·183·184·185·186·187·188·189·190·191·192·193·194·195·196·197·198·199·200·201·202·203·204·205·206·207·208·209·210·211·212·213·214·215·216·217·218·219·220·221·222·223·224·225·226·227·228·229·230·231·232·233·234·235·236·237·238·239·240·241·242] ➔ \n",
      "   >:[1·4·6·13·14·17·18·20·22·23·27·31·37·41·53·54·55·56·58·62·63·64·67·80·81·83·86·87·89·91·94·97·98·101·106·107·109·110·111·113·115·125·131·134·135·136·138·139·141·145·146·147·148·150·152·153·156·160·161·163·167·168·169·170·171·173·185·187·190·192·195·199·203·205·207·213·219·223·225·226·231·232·236·238·240·241]⚖[2·3·5·7·9·12·15·19·21·24·25·28·29·30·33·39·44·48·50·52·66·69·70·73·75·76·77·78·79·82·85·93·95·96·99·100·105·108·112·114·117·118·119·121·127·128·129·130·132·133·137·140·142·143·149·151·157·158·159·162·165·166·174·175·176·178·179·180·181·183·186·194·200·202·206·209·210·212·216·224·228·229·230·235·239·242] ➔ \n",
      "      >:[2·5·10·13·18·19·20·21·22·23·27·29·33·49·50·51·54·61·62·69·73·75·78·86·87·91·98·100·101·102·104·105·114·117·118·122·123·131·132·137·140·145·147·151·152·153·155·159·161·162·163·165·166·168·169·173·176·177·186·188·189·191·192·193·195·196·199·201·205·206·207·208·209·213·219·221·222·228·229·232]⚖[3·11·16·17·24·25·26·28·30·31·35·36·42·44·46·48·52·55·58·66·67·68·70·71·72·76·82·90·93·94·95·96·97·103·106·108·110·111·112·116·119·124·125·127·129·130·133·135·136·138·139·142·143·144·146·167·171·174·175·178·179·181·182·187·190·194·202·203·210·215·218·225·226·227·230·231·234·236·237·241] ➔ \n",
      "         >:[13·14·16·17·18·20·28·31·34·37·52·55·67·68·69·72·78·80·82·92·94·95·96·97·103·109·111·113·116·118·119·122·125·127·130·132·133·138·139·141·147·151·153·154·157·164·166·167·168·170·175·176·177·183·193·197·200·202·203·205·208·209·211·213·217·219·223·226·227·228·230·231·232·233·235·236·240]⚖[2·5·6·7·8·10·19·21·22·23·24·29·30·33·36·39·40·41·42·44·48·56·57·58·61·64·65·70·71·73·74·76·77·79·81·87·89·98·102·106·112·114·115·121·124·129·136·142·143·145·152·155·159·160·162·163·165·174·178·184·188·190·191·192·195·196·198·201·210·212·214·221·225·229·237·239·242] ➔ \n",
      "            >:[1·4·15·19·20·21·22·23·27·28·36·39·41·42·46·50·51·52·53·54·55·58·59·60·62·67·69·70·72·74·75·76·77·79·81·84·87·88·93·97·100·102·106·107·111·115·117·127·129·133·138·139·140·145·146·149·150·152·154·157·158·161·163·165·167·171·172·173·174·177·181·183·188·195·198·199·201·213·217·220·222·223·224·225·228·230·231·232·234·235·236·240]⚖[2·5·6·7·12·13·16·17·24·25·26·34·37·38·40·43·48·49·56·57·61·63·65·66·68·71·73·78·80·85·89·90·91·92·96·98·99·101·104·105·109·113·114·116·118·119·126·131·132·134·135·136·141·143·147·151·156·160·164·175·178·179·180·182·184·185·186·189·192·193·194·196·197·200·202·203·205·206·208·209·212·214·215·216·218·219·221·227·229·237·238·241] ➔ >:-178 =:-210 <:-174 \n",
      "            =:[1·8·9·27·28·29·30·33·34·35·39·40·42·43·50·53·55·56·62·70·72·73·77·84·87·88·89·93·95·96·99·101·110·116·119·120·121·123·124·134·137·142·150·152·154·156·159·160·162·166·173·174·178·181·183·188·190·193·200·203·206·210·212·226·227·229·232·234]⚖[2·3·4·7·10·13·14·16·17·18·22·24·37·45·46·48·54·58·63·71·74·75·76·78·79·81·83·86·90·91·94·98·107·113·114·115·117·128·129·130·132·139·148·158·165·168·170·172·175·176·177·180·186·187·191·192·194·195·198·201·205·211·217·222·224·231·237·239] ➔ >:-194 =:-179 <:-181 \n",
      "            <:[3·9·15·16·19·22·23·24·25·26·30·31·32·33·41·47·49·51·56·57·63·69·73·74·76·78·81·82·85·87·89·90·97·104·112·118·120·126·130·133·137·139·140·145·148·149·151·152·156·167·168·174·176·180·182·184·186·189·193·198·200·203·205·207·215·223·226·227·230·231·235·237·241·242]⚖[2·4·6·11·13·14·17·18·34·35·38·42·43·45·48·52·54·58·62·65·70·72·75·77·88·95·96·100·101·102·105·110·111·115·116·121·123·124·125·131·132·134·135·138·143·146·157·160·163·164·166·175·178·181·190·195·199·201·206·210·211·212·214·216·217·220·222·225·228·229·236·238·239·240] ➔ >:-175 =:-202 <:-230 \n",
      "         =:[4·6·12·13·14·19·23·26·30·37·41·44·66·67·68·73·74·75·76·81·89·93·94·97·99·100·104·107·115·125·130·132·133·136·137·140·145·152·156·164·165·173·175·179·180·182·186·192·206·208·210·211·213·214·227·229·231·234·237·239·242]⚖[5·10·15·16·18·21·27·29·31·34·35·36·40·42·47·53·56·69·71·79·82·91·92·98·103·105·106·109·120·123·124·127·135·144·146·148·155·157·161·162·163·167·169·171·176·178·181·188·190·193·194·202·216·217·221·222·224·228·230·235·241] ➔ \n",
      "            >:[1·2·8·10·18·21·24·26·28·29·30·32·33·34·38·40·45·46·47·48·49·52·62·77·80·81·83·85·88·91·101·102·104·107·108·117·122·123·125·126·129·132·134·135·136·137·138·139·144·145·147·151·154·157·159·162·164·170·171·174·175·182·188·189·194·195·200·202·212·215·216·219·225·229·230·234·237·238·239]⚖[5·6·9·11·13·15·16·17·20·25·27·35·37·39·41·51·56·57·58·59·61·63·64·68·70·73·79·82·84·93·94·98·100·105·106·109·110·111·113·116·118·120·121·124·127·133·141·142·146·148·152·153·161·165·166·168·173·176·178·180·183·185·187·196·198·204·205·210·213·218·220·222·224·227·232·233·236·241·242] ➔ >:-224 =:-235 <:-216 \n",
      "            =:[2·5·17·24·28·32·37·38·41·45·46·54·56·62·66·68·71·73·83·91·102·111·112·115·119·121·122·132·133·137·139·140·143·158·166·167·175·176·178·185·190·196·201·212·218·220·224·226·234·236·238]⚖[7·22·27·34·40·44·49·55·59·63·74·76·78·86·87·89·90·97·99·103·105·118·120·124·125·127·128·135·136·147·151·152·153·154·159·165·168·169·183·184·188·189·193·195·197·202·223·227·232·240·242] ➔ >:-183 =:-200 <:-212 \n",
      "            <:[7·9·15·21·29·31·38·39·40·41·46·49·52·54·59·61·66·68·69·77·78·82·84·85·86·87·89·90·91·93·95·104·107·116·120·123·133·143·149·151·155·156·159·163·165·166·168·169·172·173·177·182·183·184·185·186·188·191·194·199·202·204·210·221·224·226·228·242]⚖[1·3·4·10·14·18·30·32·35·36·43·44·47·48·51·53·57·67·73·75·76·79·88·92·98·102·105·106·108·122·124·126·129·130·131·137·138·141·142·150·157·158·162·164·171·174·176·179·180·189·192·196·197·200·206·209·211·212·217·218·219·220·223·227·230·231·235·238] ➔ >:-180 =:-239 <:-242 \n",
      "         <:[1·3·6·7·14·16·17·19·23·27·30·31·32·34·36·37·38·43·45·46·48·51·55·58·61·63·64·65·66·76·78·79·81·82·84·88·89·91·92·94·97·99·102·106·108·111·112·117·123·124·129·131·136·146·147·148·157·158·160·162·163·164·167·168·170·173·174·175·178·181·182·183·186·188·194·196·199·202·203·211·214·219·221·229·230·237·238·239·240·241]⚖[2·8·11·12·13·21·22·26·29·33·35·39·44·47·52·54·56·57·67·68·71·72·73·75·77·80·83·85·87·90·93·96·98·100·101·103·107·110·113·114·116·119·122·126·127·128·130·133·134·135·137·138·140·142·143·144·149·150·151·154·155·159·161·165·172·176·177·179·180·185·190·193·197·198·204·205·207·210·212·215·217·218·224·225·226·227·228·232·233·235] ➔ \n",
      "            >:[7·11·12·14·17·21·22·29·31·35·36·37·38·49·52·56·61·66·69·70·76·80·81·82·89·94·101·104·108·110·111·118·128·132·135·140·145·149·155·156·160·162·163·164·165·168·175·190·194·196·198·200·203·206·208·210·214·215·219·229·233·236·239·241]⚖[2·3·5·10·20·25·32·33·34·40·44·47·50·51·57·60·62·68·73·78·79·87·90·91·98·107·113·114·115·119·125·126·129·131·133·134·137·139·141·142·144·146·170·171·173·181·182·186·187·189·191·197·199·205·209·211·225·226·227·228·230·232·235·237] ➔ >:-228 =:-176 <:-165 \n",
      "            =:[1·3·7·8·11·12·18·20·21·25·26·27·28·31·33·34·35·39·41·42·45·46·50·55·56·59·60·61·62·66·68·70·71·72·73·74·75·78·80·81·83·91·92·94·95·96·98·99·100·115·117·120·121·123·125·126·130·132·135·139·141·144·146·147·152·153·154·155·156·158·160·161·165·166·167·169·170·172·173·176·177·178·179·183·184·185·186·189·192·193·194·199·203·208·210·214·217·219·220·222·223·224·225·228·230·233·234·237·238·239·242]⚖[2·4·6·9·13·14·16·17·19·22·23·24·29·30·32·36·37·38·40·43·44·47·48·49·52·53·54·57·58·63·65·67·69·76·79·85·86·87·88·89·93·97·101·102·103·105·106·107·108·109·110·111·112·113·114·116·118·119·122·127·128·129·133·137·138·142·143·145·149·150·151·157·159·162·163·164·171·174·175·181·182·187·188·190·191·195·197·198·200·201·202·204·205·206·207·211·212·213·215·216·218·221·226·227·229·231·232·235·236·240·241] ➔ >:-206 =:-209 <:-166 \n",
      "            <:[2·3·9·12·14·18·23·24·25·26·32·39·41·44·45·50·53·56·58·60·61·63·65·66·67·70·72·74·77·101·103·106·107·108·111·112·113·114·116·117·125·129·132·136·138·140·147·150·155·158·160·161·163·168·177·178·181·185·188·190·194·198·209·210·217·222·228·229·230·234·238·241]⚖[4·5·7·10·13·16·22·27·28·29·33·36·38·40·42·43·49·52·64·68·73·76·79·82·83·84·85·97·98·99·100·104·109·123·134·142·143·145·146·152·156·162·164·165·166·173·176·180·182·184·187·191·195·199·200·203·204·207·211·212·214·215·221·223·224·225·226·232·236·237·240·242] ➔ >:-162 =:-186 <:-229 \n",
      "      =:[1·4·6·7·10·17·18·20·25·34·36·37·38·39·41·47·49·53·55·56·60·61·64·65·66·73·74·75·83·84·85·87·88·90·91·93·96·97·104·105·106·112·117·121·122·124·127·136·137·139·141·144·146·148·154·161·169·170·177·181·183·184·190·193·196·200·206·208·214·215·219·227·231·232·233·236·239·240·241]⚖[3·8·11·24·26·27·29·30·32·42·48·54·58·59·63·67·68·69·71·72·76·78·79·81·99·102·107·108·113·114·115·116·118·120·125·130·131·132·134·138·140·142·145·149·150·151·158·163·166·167·172·176·178·179·180·185·186·191·194·197·198·201·202·205·207·211·213·216·217·220·222·224·225·228·229·230·235·238·242] ➔ \n",
      "         >:[1·2·5·13·14·16·17·22·23·26·28·30·31·37·41·45·49·52·53·59·63·64·68·69·70·79·87·99·100·105·107·108·118·119·120·121·123·126·133·136·139·141·146·150·160·165·168·170·171·172·173·177·179·180·181·196·202·207·208·220·221·222·227·228·229·231·232·235·237·239·241]⚖[8·12·18·19·27·33·34·35·39·42·47·60·61·65·67·71·77·80·81·82·84·85·93·94·96·98·101·116·117·122·124·127·128·130·131·132·134·135·137·140·143·145·147·148·151·154·155·159·161·164·174·183·185·186·187·188·189·190·191·192·193·199·205·210·211·215·217·223·224·233·238] ➔ \n",
      "            >:[2·4·5·8·11·24·25·26·27·30·31·33·37·39·42·44·47·48·53·55·56·62·64·65·66·67·69·73·74·77·81·82·84·86·87·88·111·115·119·121·123·126·129·130·132·138·139·140·142·143·149·154·156·157·159·161·163·169·170·173·177·180·182·184·186·190·191·192·195·198·199·201·204·206·207·208·210·212·219·224·230·232·233·235·241·242]⚖[3·6·7·10·12·13·17·19·21·23·29·35·38·40·41·46·49·54·61·63·70·71·75·76·80·89·90·91·93·94·96·97·98·99·101·102·104·105·106·107·108·109·112·113·114·116·117·120·125·127·128·131·136·144·145·147·160·162·165·166·167·168·172·175·176·178·183·187·193·194·196·202·205·209·211·213·220·222·223·226·227·234·236·237·238·239] ➔ >:-211 =:-217 <:-191 \n",
      "            =:[1·3·6·8·30·33·36·37·45·49·54·55·62·78·93·101·105·110·112·117·120·122·126·130·141·144·156·157·161·181·182·190·201·207·214·215·217·218·220·225·227·230·241]⚖[9·23·38·42·50·51·64·76·85·86·89·96·97·102·106·115·116·119·121·123·125·127·136·138·139·140·151·152·154·155·168·174·179·180·188·194·198·199·200·202·204·205·232] ➔ >:-198 =:-197 <:-201 \n",
      "            <:[6·17·20·54·59·64·77·81·88·89·94·95·100·110·115·131·135·137·139·140·143·146·153·160·162·176·184·187·195·199·222·228·230·237·241]⚖[5·11·15·16·26·27·31·34·38·41·50·51·73·80·85·87·105·106·109·116·123·124·149·164·167·172·175·181·185·190·193·194·211·239·240] ➔ >:-172 =:-220 <:-222 \n",
      "         =:[1·17·21·26·28·30·31·33·42·48·50·53·54·57·59·67·95·96·97·100·105·106·115·118·119·120·124·128·129·130·131·132·134·139·149·155·156·160·172·174·175·180·183·185·188·189·191·195·200·204·213·217·220·231·240·241]⚖[4·8·11·12·14·22·24·32·35·41·52·63·64·68·70·71·75·77·78·86·88·91·93·98·99·102·104·111·114·116·117·123·127·136·137·152·154·158·159·163·181·182·190·197·203·205·208·210·227·228·230·233·234·235·237·242] ➔ \n",
      "            >:[1·4·5·9·10·18·22·27·28·35·42·44·48·51·60·70·74·80·89·96·97·99·100·101·104·108·109·114·122·124·125·131·133·134·143·144·147·157·173·175·181·188·191·194·199·201·202·203·208·212·215·219·221·227·236·237·239]⚖[6·12·17·19·20·24·25·29·30·37·38·39·40·41·46·49·53·59·76·78·79·84·86·88·105·112·113·115·116·121·123·126·130·138·141·151·153·160·164·165·166·177·178·184·186·190·195·196·206·210·211·222·225·228·234·238·240] ➔ >:-234 =:-182 <:-237 \n",
      "            =:[3·4·8·15·17·21·25·26·31·32·34·40·45·46·50·52·54·56·60·61·62·65·66·69·70·73·75·76·77·82·89·93·94·99·101·102·103·104·109·115·117·118·121·124·125·132·134·139·142·144·153·155·156·160·161·163·168·169·172·176·178·183·184·185·188·190·195·199·203·205·212·215·219·220·221·226·228·231·242]⚖[1·6·9·11·12·13·18·23·24·28·29·30·35·36·41·42·44·49·64·71·72·74·78·80·81·83·88·91·96·97·100·106·108·110·114·119·120·122·126·127·130·131·137·138·141·143·145·147·148·149·151·157·159·164·166·167·174·177·182·186·189·196·198·200·201·202·204·206·208·211·224·229·230·232·235·237·238·239·241] ➔ >:-164 =:-218 <:-221 \n",
      "            <:[18·23·189·224]⚖[44·51·108·204] ➔ >:-204 =:-188 <:-189 \n",
      "         <:[2·7·10·15·16·22·28·29·30·34·35·36·37·40·46·47·49·50·52·53·57·58·59·62·65·66·75·76·79·82·89·91·95·96·97·99·103·104·112·115·119·121·123·129·130·135·137·138·140·141·144·145·148·151·152·153·165·169·170·174·175·176·177·179·187·189·191·196·201·205·206·210·212·213·214·221·224·237·240]⚖[3·9·13·19·20·21·25·27·31·33·41·42·43·44·48·51·54·55·63·64·67·68·71·72·73·80·81·84·86·87·94·98·100·102·108·110·122·124·132·133·142·143·146·149·150·155·156·158·162·163·164·173·180·182·184·188·190·192·194·198·199·203·207·208·211·216·217·218·219·220·226·227·229·231·232·234·235·236·241] ➔ \n",
      "            >:[17·23·26·30·50·78·103·143·146·151·158·159·182·222·226·227·238]⚖[2·7·14·49·71·85·96·100·113·114·122·152·166·184·188·198·207] ➔ >:-184 =:-208 <:-227 \n",
      "            =:[6·20·32·36·43·47·48·49·52·58·60·67·87·101·105·107·111·116·119·128·133·139·143·147·166·168·172·178·181·202·203·205·208·210·220·228·232·233·236·240]⚖[4·5·9·17·23·28·33·37·59·62·74·77·79·81·85·86·90·91·95·100·102·106·108·112·124·135·137·148·152·189·193·194·196·198·207·214·219·224·231·235] ➔ >:-193 =:-215 <:-233 \n",
      "            <:[14·16·39·43·44·52·55·63·89·114·119·127·128·145·152·169·174·202·203·214·216·218·226]⚖[15·33·48·49·61·62·67·78·81·101·108·149·162·166·177·184·190·191·193·194·230·231·242] ➔ >:-177 =:-196 <:-214 \n",
      "      <:[11·15·19·21·24·27·28·29·30·31·33·37·41·47·48·52·56·59·65·67·70·71·73·75·76·80·83·85·86·89·91·92·93·98·101·103·110·111·112·116·118·119·122·125·128·132·133·141·147·152·154·155·157·158·159·160·161·162·164·167·170·173·174·175·177·178·183·187·189·192·196·197·199·200·201·202·206·210·216·220·224·228·230·231·232·233·234·235·241]⚖[1·2·4·5·6·7·8·12·13·18·20·22·23·25·26·34·35·36·42·43·44·45·51·53·54·55·57·58·64·66·69·72·74·77·78·82·84·88·90·94·96·97·99·104·105·106·108·109·113·117·120·126·127·130·131·135·137·138·139·148·150·165·172·182·184·185·188·191·193·194·195·204·205·207·208·209·211·212·215·217·219·221·222·223·225·226·229·240·242] ➔ \n",
      "         >:[4·8·10·11·12·17·19·20·22·23·25·32·35·39·46·47·53·55·56·60·62·66·67·70·72·76·87·89·99·103·106·109·110·117·121·130·132·133·141·142·143·144·145·147·150·152·154·155·157·169·170·172·174·175·176·178·183·186·190·191·192·196·201·202·203·204·207·208·210·223·224·226·229·231·232·233·238]⚖[1·2·7·9·13·28·29·33·40·41·43·44·48·49·50·51·52·59·63·64·73·74·75·80·82·84·85·86·91·95·96·97·98·104·107·111·113·114·115·119·120·122·128·131·134·137·140·146·149·151·153·156·163·167·168·171·177·179·180·182·187·188·189·193·194·205·206·212·213·219·220·222·225·227·234·237·242] ➔ \n",
      "            >:[1·17·25·37·47·52·55·57·61·70·77·85·100·119·125·132·135·145·149·151·152·156·170·174·175·182·196·199·204·205·209·233·239]⚖[9·12·21·34·48·50·51·56·58·59·63·72·74·79·94·98·99·122·146·153·157·161·167·171·178·192·195·198·225·230·231·235·237] ➔ >:-225 =:-219 <:-205 \n",
      "            =:[10·12·20·29·30·33·44·50·56·68·73·98·100·121·128·130·137·140·145·159·162·171·200·225·227·228·237·240]⚖[2·7·17·43·59·62·63·64·78·83·84·95·108·119·124·132·138·139·146·150·153·154·173·179·195·221·232·236] ➔ >:-195 =:-185 <:-240 \n",
      "            <:[8·17·22·27·31·34·36·37·60·65·69·71·73·83·87·99·108·109·121·122·135·136·140·145·150·151·159·169·173·180·191·192·199·205·218·222·223·232·233·234·235]⚖[15·19·26·29·33·44·46·48·52·53·62·75·78·82·98·101·113·114·131·137·143·144·146·155·156·162·176·179·184·189·194·195·208·211·212·213·214·215·225·226·242] ➔ >:-226 =:-207 <:-223 \n",
      "         =:[2·4·11·16·17·18·19·22·27·28·30·33·35·39·40·45·46·48·51·52·53·54·56·58·59·60·61·64·66·67·71·75·77·78·79·82·83·86·87·88·90·94·96·100·102·104·105·112·114·115·116·118·121·122·124·126·127·129·130·131·132·134·135·137·138·141·142·144·148·149·151·152·156·161·163·167·169·178·180·184·187·198·205·209·210·211·215·221·222·223·229·234·238·239·240]⚖[1·5·6·7·10·12·20·21·23·25·26·29·31·32·36·37·38·42·43·44·55·57·62·68·72·73·74·80·81·85·91·92·95·97·99·101·103·107·108·109·110·111·113·117·119·120·123·125·128·133·136·139·140·143·145·147·150·153·157·158·159·160·164·165·168·170·171·173·185·186·189·191·192·193·194·195·196·197·199·202·204·208·216·217·218·219·225·227·231·232·233·236·237·241·242] ➔ \n",
      "            >:[2·9·11·12·18·28·29·32·33·34·36·37·38·40·44·46·48·49·54·55·57·62·66·67·68·69·77·78·79·80·81·85·92·93·95·100·101·110·112·115·120·125·128·129·130·131·134·136·140·143·146·149·150·155·158·163·171·177·180·182·184·185·187·188·189·191·199·205·206·207·212·217·223·224·227·228·229·232·233·235·238·239·242]⚖[5·6·10·14·15·17·19·22·25·27·30·41·42·43·50·51·56·58·60·63·64·65·70·72·74·75·76·84·86·88·89·90·91·94·97·98·99·102·103·105·107·109·114·116·124·126·127·132·138·139·147·148·151·152·153·156·159·160·164·167·170·172·175·176·179·186·192·194·195·197·201·203·204·208·209·214·215·218·226·230·231·236·237] ➔ >:-236 =:-168 <:-171 \n",
      "            =:[4·10·11·19·20·22·25·36·37·39·44·45·47·48·49·54·59·64·66·69·71·74·75·76·77·79·85·86·89·90·92·102·104·107·115·118·119·122·125·131·132·135·137·143·149·150·152·153·157·158·169·174·176·177·180·184·186·189·194·197·201·202·205·213·214·215·218·222·225·227·228·230·241·242]⚖[2·5·6·7·13·15·16·21·23·24·26·27·28·30·32·33·34·41·46·50·51·55·56·57·58·61·62·68·73·78·88·93·95·97·99·101·103·108·111·114·120·124·129·134·138·140·142·145·146·148·154·156·160·162·163·166·168·171·172·181·183·196·199·203·204·207·208·216·217·219·226·233·234·236] ➔ >:-203 =:-190 <:-213 \n",
      "            <:[4·8·13·14·16·17·20·21·22·24·28·29·34·38·40·45·48·49·51·54·59·61·63·66·68·71·72·76·81·83·84·90·92·94·101·103·105·107·109·137·139·141·145·146·147·148·151·152·154·162·163·164·165·167·168·173·176·180·181·183·184·193·194·196·197·203·208·209·211·213·217·222·228·231·232·233·240]⚖[3·5·6·7·18·23·25·30·31·33·36·41·42·44·46·47·50·65·67·73·75·79·95·96·97·98·104·106·110·111·112·113·115·120·122·123·124·125·126·127·130·131·132·134·135·138·143·150·156·157·160·161·172·174·175·179·189·190·191·198·199·200·201·204·207·210·215·216·220·221·223·224·226·235·237·238·239] ➔ >:-238 =:-169 <:-163 \n",
      "         <:[8·17·18·20·21·24·25·40·44·47·50·54·61·65·66·69·78·79·81·85·86·87·89·91·93·94·98·99·100·102·103·111·114·115·119·121·124·125·127·134·135·139·148·149·151·153·154·155·159·162·164·166·167·168·169·175·178·180·186·187·194·198·201·203·206·207·217·220·221·222·223·225·226·227·234·237·240·241]⚖[3·4·5·6·10·13·14·22·26·27·31·32·34·36·38·41·49·51·56·57·58·59·64·67·72·73·75·76·88·90·92·96·101·104·106·110·116·118·120·131·132·133·136·137·138·140·144·145·147·152·158·165·170·172·174·176·181·182·183·184·185·188·189·190·191·192·195·196·202·205·208·209·212·213·230·232·235·242] ➔ \n",
      "            >:[3·4·8·9·14·21·28·30·34·39·41·42·48·51·52·53·61·66·69·70·72·73·76·77·79·82·83·84·94·96·99·106·112·115·119·120·122·126·127·128·129·135·137·146·151·152·154·159·162·170·179·181·183·188·191·201·202·205·209·218·222·228·229·238]⚖[1·2·6·12·13·16·17·19·20·24·26·27·29·33·36·37·38·44·46·49·50·54·59·71·89·98·100·101·102·107·113·123·124·130·131·134·139·141·142·148·153·160·161·163·175·180·187·192·193·195·203·212·213·215·216·217·219·220·221·224·225·230·234·235] ➔ >:-192 =:-232 <:-170 \n",
      "            =:[2·5·10·12·13·14·15·16·17·18·21·22·24·25·26·27·28·29·40·43·46·48·49·51·52·57·58·60·62·64·65·70·78·83·84·85·86·88·95·96·98·99·102·103·104·105·106·109·111·112·113·114·115·116·119·120·122·125·127·132·141·142·144·150·151·154·155·158·160·162·166·168·169·170·171·172·173·175·176·177·179·181·182·188·191·193·201·203·204·205·208·209·211·214·221·223·226·228·229·230·232·234·236·237·240]⚖[1·3·7·8·11·20·23·30·31·33·34·35·36·37·38·39·42·45·47·53·54·55·59·61·63·66·67·68·69·71·72·73·74·76·77·79·80·81·82·87·89·90·93·94·97·100·101·107·110·117·118·121·123·126·128·129·130·131·133·134·136·137·138·140·143·145·147·148·149·152·153·156·157·159·161·163·164·165·167·178·180·183·184·185·186·190·195·196·197·200·202·206·207·210·213·215·217·218·222·225·227·231·235·238·241] ➔ >:-231 =:-199 <:-173 \n",
      "            <:[2·4·5·9·10·11·12·14·16·19·20·21·23·25·28·30·32·33·40·47·52·53·57·62·77·79·84·90·96·101·105·106·107·110·111·112·115·117·119·124·132·135·136·138·141·150·152·153·154·155·157·158·160·161·166·169·170·174·175·176·178·182·183·184·186·187·188·189·195·204·207·208·209·215·217·218·219·225·232·235·236·238·239·242]⚖[8·22·24·27·29·31·36·37·41·43·44·46·49·51·56·58·60·63·65·66·67·68·69·72·76·80·81·85·87·88·95·98·99·100·104·108·109·113·116·118·120·123·125·126·128·129·130·131·133·137·139·140·142·145·146·149·156·163·165·171·173·180·190·192·196·197·198·199·201·205·206·211·213·221·222·224·226·227·228·229·230·231·240·241] ➔ >:-241 =:-167 <:-187 \n",
      "   =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53·54·55·56·57·58·59·60·61·62·63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108]⚖[135·136·137·138·139·140·141·142·143·144·145·146·147·148·149·150·151·152·153·154·155·156·157·158·159·160·161·162·163·164·165·166·167·168·169·170·171·172·173·174·175·176·177·178·179·180·181·182·183·184·185·186·187·188·189·190·191·192·193·194·195·196·197·198·199·200·201·202·203·204·205·206·207·208·209·210·211·212·213·214·215·216·217·218·219·220·221·222·223·224·225·226·227·228·229·230·231·232·233·234·235·236·237·238·239·240·241·242] ➔ \n",
      "      >:[2·8·9·18·19·29·30·35·38·40·41·46·47·48·50·51·52·55·58·65·68·70·71·72·74·76·80·81·90·95·97·101·105·107·108·123·124·127·129·132·136·138·142·148·149·154·156·160·161·167·171·172·173·174·175·180·183·190·192·193·196·200·202·203·213·215·218·220·221·222·223·226·227·230·235·236·242]⚖[1·3·5·7·10·11·15·17·20·22·23·24·27·32·33·37·39·42·49·54·56·62·64·69·73·75·78·79·82·85·87·91·92·93·96·99·100·102·112·118·121·122·128·131·133·134·135·137·139·140·141·146·153·155·158·163·169·170·177·178·182·186·187·189·191·194·195·204·205·209·219·225·228·231·232·233·240] ➔ \n",
      "         >:[1·6·7·14·16·17·19·21·22·28·31·36·42·43·48·61·62·63·64·71·73·76·78·80·86·87·88·89·98·99·104·106·111·112·113·116·117·121·126·133·135·137·144·147·151·155·157·159·161·163·165·169·184·187·188·190·212·213·215·219·221·224·230·231·233]⚖[9·15·18·24·29·30·33·37·38·39·40·41·44·45·47·50·51·54·55·57·59·65·68·77·81·82·85·93·94·96·107·109·114·124·127·130·132·141·145·146·149·150·153·160·164·168·170·171·175·178·180·186·194·197·201·203·208·216·225·226·228·232·238·241·242] ➔ \n",
      "            >:[1·3·4·5·10·22·24·26·27·32·36·37·39·40·43·48·54·57·58·62·69·77·79·82·83·87·88·98·101·105·111·117·119·120·121·123·125·131·137·143·148·153·155·156·157·158·172·184·188·189·192·193·202·203·206·208·215·216·217·226·228·229·230]⚖[6·8·13·16·18·19·23·31·33·42·44·49·50·59·63·70·76·90·92·94·103·106·107·110·112·114·118·124·126·127·132·136·138·144·146·152·159·161·166·170·175·178·179·181·183·186·195·196·198·204·207·210·211·212·213·220·223·227·233·235·238·240·241] ➔ >:-146 =:-141 <:-153 \n",
      "            =:[10·22·26·27·28·36·38·43·46·50·53·61·65·77·105·110·115·116·120·140·141·144·165·170·178·179·181·186·188·199·206·209·212·216·218·225·231·238·241]⚖[2·4·5·13·37·47·58·63·67·68·69·73·80·83·84·90·94·98·100·103·104·107·122·123·131·132·135·136·153·158·172·187·197·202·204·208·214·220·222] ➔ >:-158 =:-139 <:-140 \n",
      "            <:[4·5·6·9·12·13·19·21·23·26·28·33·37·40·41·42·43·47·52·56·57·59·62·63·64·68·69·70·74·77·81·89·92·95·96·97·98·101·102·103·106·107·108·109·113·115·116·118·120·123·128·133·134·138·140·142·143·147·148·150·152·155·159·161·163·164·165·167·170·171·177·179·182·183·185·187·188·189·192·194·196·197·201·209·212·213·216·225·227·230·232·234·237·238]⚖[1·2·8·10·11·17·18·20·25·29·31·32·38·39·46·49·50·51·54·65·66·67·72·73·75·79·80·82·86·87·88·90·93·94·100·104·110·111·112·117·121·122·124·125·127·130·131·132·137·139·141·144·145·146·149·151·153·154·158·160·166·168·172·174·176·178·181·184·193·198·200·202·203·204·205·210·211·214·215·217·219·221·222·223·224·228·229·231·233·236·239·240·241·242] ➔ >:-137 =:-135 <:-155 \n",
      "         =:[4·5·7·8·12·17·19·25·29·32·34·35·43·45·48·50·55·56·61·62·65·71·73·74·80·81·86·93·102·103·104·105·106·108·110·114·115·120·127·129·130·132·136·137·142·143·150·152·154·156·158·163·166·172·180·191·192·193·194·197·199·202·203·209·210·213·217·220·225·233·235·236·241·242]⚖[2·3·6·10·13·16·22·26·31·33·36·37·39·46·47·51·53·58·60·64·67·68·69·75·76·78·79·87·88·90·91·94·96·97·99·100·101·111·112·113·118·121·123·124·125·134·138·139·140·141·145·146·148·149·151·155·157·160·164·167·171·173·184·186·190·195·204·212·219·221·231·234·237·240] ➔ \n",
      "            >:[1·2·8·9·13·16·18·20·21·23·25·26·28·30·34·37·39·40·43·44·45·48·50·51·52·55·57·59·63·64·68·69·71·73·74·78·80·83·84·86·88·89·90·96·97·103·105·108·109·110·111·112·118·120·121·122·125·128·132·133·135·138·145·146·148·154·156·161·162·163·164·170·172·173·177·178·179·181·185·186·188·192·193·195·197·202·203·204·209·210·212·221·222·224·225·226·227·229·230·232·234·239·241]⚖[3·4·5·6·7·10·11·12·15·17·22·24·27·29·31·32·35·36·38·41·46·47·49·53·60·61·62·65·67·70·72·75·76·77·81·85·87·91·92·94·95·98·100·102·104·106·107·114·116·123·126·127·129·130·131·136·137·139·141·143·144·149·150·153·157·158·159·160·165·166·167·168·169·171·174·175·176·180·183·184·190·191·196·199·200·201·206·207·208·213·216·217·218·219·228·231·233·235·236·237·238·240·242] ➔ >:-157 =:-151 <:-145 \n",
      "            =:[9·14·19·23·35·36·39·40·48·50·51·52·53·59·63·68·69·70·77·93·96·97·101·102·103·104·110·121·128·129·137·138·140·145·155·156·157·159·168·171·183·186·187·192·202·211·223·227·228·231·237·241]⚖[1·12·24·25·26·33·34·41·42·44·46·65·66·72·78·79·86·88·89·91·99·105·108·109·111·124·125·131·132·133·142·144·149·161·164·166·173·176·177·178·184·190·195·205·209·210·215·219·229·234·235·236] ➔ >:-144 =:-147 <:-159 \n",
      "            <:[3·4·8·9·13·18·22·23·27·33·40·42·43·45·48·49·50·51·52·54·59·62·63·64·69·75·77·78·83·90·94·96·98·110·115·116·119·121·123·128·131·138·139·143·154·164·165·170·172·173·185·186·190·196·197·200·201·203·205·219·220·221·224·227·230·231]⚖[1·5·10·11·16·17·19·20·35·36·38·41·46·56·57·66·72·73·76·84·88·95·99·101·102·103·111·113·118·124·126·129·134·135·136·140·144·145·146·151·152·155·169·174·175·177·179·180·181·182·184·187·188·189·191·195·198·211·214·218·222·226·228·229·233·239] ➔ >:-152 =:-150 <:-143 \n",
      "         <:[4·5·6·9·18·46·51·62·64·69·70·81·86·93·106·107·110·113·118·120·130·135·136·138·148·159·164·171·175·180·201·206·220·235·239]⚖[2·25·36·37·38·43·60·61·78·88·104·112·115·119·125·128·131·133·137·140·142·147·151·154·160·163·172·176·178·183·187·200·202·208·217] ➔ \n",
      "            >:[9·13·20·22·23·29·39·41·48·53·61·69·70·77·88·92·103·112·119·125·130·131·139·144·145·146·148·153·154·167·169·175·180·182·191·192·196·202·208·214·221·225·227·233·237·242]⚖[2·12·19·25·32·35·38·40·46·47·63·65·74·83·87·89·100·102·105·107·109·117·122·127·137·138·156·159·160·161·171·173·187·190·193·201·205·209·211·215·217·220·224·228·231·238] ➔ >:-160 =:-142 <:-154 \n",
      "            =:[13·14·17·20·21·26·27·30·32·40·42·47·49·61·62·63·64·65·77·79·80·92·93·94·101·107·108·109·113·121·123·124·132·133·134·145·146·155·156·164·170·171·173·174·176·180·181·191·194·207·208·212·213·215·216·217·220·223·230·231·234·236·237·238·242]⚖[5·8·15·19·23·28·37·43·50·51·52·55·68·69·72·73·83·86·87·88·96·98·100·103·106·112·114·116·120·125·126·131·136·137·138·141·148·150·157·160·161·166·167·168·169·177·182·183·184·185·188·189·195·197·198·202·203·206·209·211·218·222·229·233·240] ➔ >:-161 =:-149 <:-156 \n",
      "            <:[16·23·25·30·37·46·54·56·64·70·77·89·101·103·105·109·112·121·127·136·140·150·155·157·160·161·163·171·178·187·194·197·199·207·210·212·216·224·225·230·236]⚖[3·4·8·13·15·17·20·40·53·61·65·69·71·73·81·86·88·94·95·114·116·118·124·126·131·138·142·158·162·164·167·179·180·189·191·198·200·206·232·240·242] ➔ >:-138 =:-148 <:-136 \n",
      "      =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53·54·55·56·57·58·59·60·61·62·63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117]⚖[126·127·128·129·130·131·132·133·134·135·136·137·138·139·140·141·142·143·144·145·146·147·148·149·150·151·152·153·154·155·156·157·158·159·160·161·162·163·164·165·166·167·168·169·170·171·172·173·174·175·176·177·178·179·180·181·182·183·184·185·186·187·188·189·190·191·192·193·194·195·196·197·198·199·200·201·202·203·204·205·206·207·208·209·210·211·212·213·214·215·216·217·218·219·220·221·222·223·224·225·226·227·228·229·230·231·232·233·234·235·236·237·238·239·240·241·242] ➔ \n",
      "         >:[2·5·6·8·10·11·14·17·18·21·24·28·29·33·39·40·43·45·46·51·54·56·58·61·62·66·69·74·75·79·82·85·86·88·92·94·96·97·100·101·105·106·107·108·109·115·117·119·123·127·128·130·137·138·139·140·141·144·145·149·154·157·162·166·169·176·177·181·186·188·191·196·201·203·207·210·213·220·221·222·225·228·233·234·239·241]⚖[1·7·12·15·16·23·25·30·35·36·37·42·47·49·52·53·57·59·60·64·65·67·68·71·73·84·90·99·102·103·104·112·114·116·121·122·125·131·132·134·135·136·146·147·148·150·151·155·156·158·164·165·167·168·171·172·173·174·175·179·180·183·189·190·192·193·194·197·199·202·206·208·209·212·215·216·218·219·223·226·227·229·231·237·238·242] ➔ \n",
      "            >:[2·6·15·23·30·31·32·39·40·44·45·49·52·53·54·58·59·63·64·66·67·75·77·82·84·87·98·101·103·111·112·113·115·121·129·132·136·138·145·152·154·155·156·157·158·160·161·162·165·166·168·173·175·176·180·182·185·189·192·194·195·197·201·206·207·209·211·213·217·218·220·221·222·227·228·230]⚖[5·7·9·12·14·16·20·24·25·27·29·33·34·38·42·46·47·50·55·56·60·69·72·73·74·83·85·86·88·91·93·97·99·110·114·119·120·122·124·127·131·139·141·144·146·148·149·153·159·167·170·171·177·179·184·190·193·198·202·203·204·205·208·210·212·214·215·219·223·225·226·231·232·239·240·242] ➔ >:-131 =:-134 <:-132 \n",
      "            =:[11·14·17·23·25·27·28·54·63·79·83·84·98·101·104·106·109·129·130·142·146·147·152·154·155·158·160·165·166·167·172·174·178·190·193·198·219·222·224·229·239·241]⚖[1·3·6·16·18·21·24·30·31·32·43·46·60·69·70·73·74·77·81·85·87·92·97·100·119·127·132·133·138·141·168·169·179·180·181·201·202·204·206·215·220·230] ➔ >:-133 =:-126 <:-129 \n",
      "            <:[1·2·13·15·20·23·24·29·30·33·36·40·41·43·44·45·49·52·58·59·63·65·69·72·75·76·77·86·87·91·98·104·105·108·111·112·117·119·121·130·132·147·156·163·167·169·171·172·177·188·189·191·197·199·202·205·207·208·212·214·217·218·219·220·222·229·230·232·236]⚖[3·4·5·6·12·17·22·25·26·31·32·48·50·54·56·57·62·70·73·78·80·83·85·94·96·101·106·118·122·124·125·126·127·129·138·145·146·150·153·158·161·164·166·168·170·174·175·179·180·181·190·192·194·196·203·204·209·215·216·221·224·225·227·228·231·233·238·241·242] ➔ >:-127 =:-128 <:-130 \n",
      "         =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53·54·55·56·57·58·59·60·61·62·63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120]⚖[123·124·125·126·127·128·129·130·131·132·133·134·135·136·137·138·139·140·141·142·143·144·145·146·147·148·149·150·151·152·153·154·155·156·157·158·159·160·161·162·163·164·165·166·167·168·169·170·171·172·173·174·175·176·177·178·179·180·181·182·183·184·185·186·187·188·189·190·191·192·193·194·195·196·197·198·199·200·201·202·203·204·205·206·207·208·209·210·211·212·213·214·215·216·217·218·219·220·221·222·223·224·225·226·227·228·229·230·231·232·233·234·235·236·237·238·239·240·241·242] ➔ \n",
      "            >:[1·2·4·7·15·22·30·32·33·39·40·41·42·44·52·55·56·57·59·60·62·64·66·68·69·71·73·74·75·76·78·86·88·90·91·97·98·101·102·107·108·111·112·114·118·119·120·123·130·132·133·136·139·142·143·146·147·149·154·157·159·161·171·172·176·177·178·180·181·190·191·193·197·207·208·221·224·228·229·231·232·234·240]⚖[5·8·9·10·11·12·14·16·17·20·24·27·29·35·38·43·46·48·51·53·58·63·65·67·70·72·80·87·92·93·96·99·100·110·113·117·121·124·126·128·131·135·137·145·150·151·152·153·155·156·160·164·166·170·173·182·183·184·185·186·187·188·189·192·194·200·201·202·203·204·205·210·211·212·214·215·220·222·227·235·236·239·242] ➔ >:-124 =:-125 <:-123 \n",
      "            =:[1·2·3·4·5·6·7·8·9·10·11·12·13·14·15·16·17·18·19·20·21·22·23·24·25·26·27·28·29·30·31·32·33·34·35·36·37·38·39·40·41·42·43·44·45·46·47·48·49·50·51·52·53·54·55·56·57·58·59·60·61·62·63·64·65·66·67·68·69·70·71·72·73·74·75·76·77·78·79·80·81·82·83·84·85·86·87·88·89·90·91·92·93·94·95·96·97·98·99·100·101·102·103·104·105·106·107·108·109·110·111·112·113·114·115·116·117·118·119·120·121]⚖[122·123·124·125·126·127·128·129·130·131·132·133·134·135·136·137·138·139·140·141·142·143·144·145·146·147·148·149·150·151·152·153·154·155·156·157·158·159·160·161·162·163·164·165·166·167·168·169·170·171·172·173·174·175·176·177·178·179·180·181·182·183·184·185·186·187·188·189·190·191·192·193·194·195·196·197·198·199·200·201·202·203·204·205·206·207·208·209·210·211·212·213·214·215·216·217·218·219·220·221·222·223·224·225·226·227·228·229·230·231·232·233·234·235·236·237·238·239·240·241·242] ➔ >:-122 =:0 <:-121 \n",
      "            <:[7·39·41·44·46·60·78·80·96·100·104·106·118·155·165·182·202·220]⚖[21·38·43·48·67·97·107·113·119·123·134·163·168·181·204·213·225·228] ➔ >:-119 =:-120 <:-118 \n",
      "         <:[19·36·37·39·40·44·45·51·55·60·61·71·76·79·102·109·112·116·118·122·138·146·155·157·159·166·173·177·183·184·192·193·196·198·202·210·217·221·223·224]⚖[15·17·21·28·29·30·38·41·42·43·49·50·54·58·67·80·81·95·97·103·113·114·117·120·128·139·156·165·172·200·211·213·216·220·222·233·237·238·239·240] ➔ \n",
      "            >:[6·10·12·13·15·21·24·25·34·35·36·38·39·41·43·44·45·48·56·59·61·62·69·74·86·89·90·93·95·96·107·111·112·113·116·122·125·127·131·133·139·141·143·145·148·149·154·157·163·164·169·170·172·173·175·177·179·180·181·182·188·192·194·195·196·198·200·203·204·205·210·213·225·233·234·235·236·238·240]⚖[2·3·7·14·16·17·18·19·20·26·27·28·31·32·33·37·40·42·50·53·67·70·71·75·78·79·80·81·82·83·85·87·91·94·98·99·103·104·108·109·110·117·118·120·121·123·128·130·135·136·140·142·147·152·155·156·159·161·162·165·176·189·190·191·193·201·202·206·207·211·216·218·220·221·222·226·227·228·231] ➔ >:-117 =:-114 <:-113 \n",
      "            =:[1·2·3·4·6·9·11·14·17·18·19·20·22·23·27·32·38·42·43·44·46·47·48·50·51·53·55·59·60·64·67·68·69·72·74·76·79·81·84·86·89·93·94·96·97·98·105·107·114·115·119·120·121·122·123·124·125·126·127·132·143·149·150·151·152·154·158·159·160·162·163·165·166·168·171·176·178·183·184·185·187·191·194·195·196·198·200·208·210·211·216·217·218·221·225·228·230·231·232·233·239]⚖[5·10·12·13·16·24·25·26·28·30·31·33·34·35·36·37·39·40·41·45·49·54·56·58·61·63·65·71·75·78·80·82·83·88·91·92·95·99·100·101·102·104·106·108·109·110·112·128·129·130·131·135·136·137·138·139·140·141·144·145·147·148·156·161·164·169·172·173·174·175·177·179·181·188·189·190·192·193·199·202·203·204·205·207·209·213·214·215·219·220·222·223·224·226·227·229·234·235·236·237·240] ➔ >:-110 =:-111 <:-115 \n",
      "            <:[6·9·10·18·26·46·49·60·62·69·76·78·82·97·100·103·106·109·114·122·124·129·136·138·141·146·150·160·163·166·171·175·176·187·200·214·221·222·230·233]⚖[2·4·12·19·23·24·32·37·38·44·45·59·61·63·66·79·81·87·90·91·93·94·96·99·112·119·153·154·159·161·162·174·179·183·197·198·211·218·224·240] ➔ >:-112 =:-116 <:-109 \n",
      "      <:[6·7·15·17·20·25·26·27·28·32·35·39·41·47·50·51·52·53·62·63·66·68·69·73·84·85·87·92·96·99·100·106·107·112·115·121·124·125·127·129·138·139·142·144·148·151·152·153·157·159·160·161·162·165·168·170·174·176·177·179·180·181·182·184·185·187·195·200·203·204·206·208·211·215·216·217·218·222·226·228·229·230·232·235·236]⚖[1·2·5·8·10·11·13·16·18·19·24·36·37·38·40·43·44·45·49·54·56·61·64·70·72·74·75·76·79·81·82·86·88·89·94·97·98·102·104·114·116·118·119·120·123·126·130·132·136·141·145·146·147·149·158·163·167·169·171·172·173·175·186·188·189·190·193·196·197·198·199·201·202·205·207·210·219·220·221·223·224·227·233·241·242] ➔ \n",
      "         >:[4·5·15·16·19·20·21·22·27·34·35·39·40·41·43·45·50·52·53·58·59·60·71·83·85·86·91·93·98·99·102·105·106·109·112·113·114·116·117·119·123·124·125·133·135·138·139·142·143·144·151·153·154·155·159·161·162·169·171·173·174·179·181·183·185·186·188·189·192·197·200·202·206·207·210·211·213·217·218·220·225·227·228·229·235]⚖[1·3·8·10·11·12·13·14·25·26·28·29·30·31·32·36·46·47·51·54·56·57·61·63·64·65·66·68·69·70·73·75·77·80·81·82·84·88·89·90·92·100·107·108·110·115·118·122·127·130·134·136·137·140·141·145·146·147·150·152·157·164·166·167·168·170·190·191·193·198·203·204·212·214·215·221·222·224·226·230·232·234·236·238·242] ➔ \n",
      "            >:[7·8·10·12·14·15·16·18·20·22·24·26·27·38·39·41·44·48·52·55·56·57·63·65·66·70·72·74·77·78·81·82·87·90·91·95·96·102·103·105·108·113·117·119·121·123·125·129·135·136·137·139·142·143·144·145·147·148·151·153·155·156·157·160·163·165·166·168·170·173·176·183·184·186·188·189·191·192·199·201·210·211·215·216·218·220·223·226·230·231·232·233·234·238·241]⚖[1·3·4·6·9·11·13·19·21·23·25·28·29·30·31·37·40·43·45·46·47·49·50·51·58·60·62·64·67·68·69·71·75·79·84·85·88·97·98·99·100·104·106·109·110·112·115·116·118·120·122·124·126·130·132·133·134·140·141·152·162·164·167·169·171·172·174·175·177·179·180·181·185·196·198·200·202·203·207·208·209·212·213·214·217·219·222·224·227·229·235·236·237·239·242] ➔ >:-88 =:-89 <:-82 \n",
      "            =:[9·18·29·31·34·62·76·91·103·104·109·141·142·148·151·157·186·204·216·224·233·234·235]⚖[24·37·54·56·75·97·110·115·120·135·150·152·158·160·168·171·175·185·193·209·214·220·237] ➔ >:-97 =:-94 <:-104 \n",
      "            <:[18·22·56·57·64·85·95·102·104·113·126·132·142·152·161·199·201·212·227·231·234]⚖[7·15·27·34·72·98·115·118·119·127·137·141·165·179·182·191·203·221·230·232·240] ➔ >:-98 =:-86 <:-102 \n",
      "         =:[2·5·8·9·17·18·22·24·25·26·29·30·33·36·44·52·53·54·57·60·61·64·65·70·75·77·80·81·82·85·86·89·90·91·96·105·115·117·126·128·136·145·154·155·156·161·170·172·175·176·177·178·180·182·183·184·185·186·190·192·193·197·200·204·206·209·210·216·218·219·224·227·233·234·237·240]⚖[1·3·4·7·12·14·19·31·34·38·40·41·45·46·47·50·56·59·63·66·71·72·76·78·79·84·88·93·94·95·98·99·102·107·108·110·113·114·116·118·120·121·122·123·132·134·140·141·144·146·149·150·152·157·162·163·166·169·171·174·179·181·188·191·198·199·207·211·214·222·223·228·231·236·239·242] ➔ \n",
      "            >:[1·3·4·7·8·14·16·18·21·22·23·29·30·35·41·45·47·49·51·53·56·58·62·69·72·74·78·79·80·82·86·91·99·101·102·103·104·106·108·113·116·121·124·125·126·128·139·142·146·147·153·154·155·158·160·164·168·170·174·176·177·183·187·204·209·216·220·222·223·228·231·242]⚖[2·5·6·15·17·19·20·24·25·26·32·37·42·43·44·46·52·55·63·64·66·67·73·76·77·81·83·84·87·88·89·90·94·95·96·98·107·115·120·122·130·131·132·133·140·150·151·156·159·161·162·166·169·172·173·181·182·184·186·188·201·211·215·218·219·221·225·226·230·237·239·240] ➔ >:-95 =:-93 <:-108 \n",
      "            =:[3·6·9·14·15·16·18·22·24·25·27·29·30·32·39·40·47·49·51·52·56·63·64·68·70·71·72·74·75·79·80·82·84·87·88·91·92·95·96·97·98·99·101·102·105·108·110·111·119·120·122·123·124·130·133·134·135·137·138·144·147·149·151·153·154·155·164·166·167·168·172·174·175·176·178·179·181·183·188·192·193·194·199·204·207·212·213·216·224·227·229·230·234·238·241]⚖[2·4·7·10·12·17·20·21·23·28·33·35·36·38·41·42·43·44·45·46·48·50·53·54·55·58·60·61·66·67·73·76·81·85·86·89·93·100·103·104·106·109·112·114·115·116·117·118·125·126·129·132·140·141·142·143·145·146·148·160·161·162·163·169·170·171·173·177·180·184·185·187·189·200·201·202·205·206·208·211·215·217·218·219·221·223·225·226·232·233·235·236·237·239·240] ➔ >:-103 =:-83 <:-101 \n",
      "            <:[4·6·7·9·11·13·20·22·23·31·35·39·43·44·45·46·48·52·56·58·60·61·63·64·66·69·71·73·76·77·79·81·82·88·92·96·99·101·103·104·105·112·113·115·118·120·121·127·130·132·136·137·140·142·144·145·154·156·157·158·159·160·161·162·163·164·166·167·174·175·176·177·181·188·189·190·193·194·198·200·208·212·214·215·216·218·220·223·226·230·234·236·240·242]⚖[1·2·3·5·10·12·14·16·17·18·21·24·26·29·30·33·36·40·41·47·49·50·54·55·57·62·65·67·68·70·74·75·78·83·84·87·89·90·93·94·95·97·98·106·107·108·110·111·116·119·123·124·125·129·133·134·139·141·143·146·150·151·155·168·169·170·172·173·179·180·182·183·185·191·195·196·199·203·204·205·207·211·213·217·219·221·224·225·231·232·233·235·238·239] ➔ >:-90 =:-91 <:-105 \n",
      "         <:[3·5·6·7·8·9·14·18·20·24·25·29·31·32·43·45·46·48·53·54·56·57·59·63·64·65·70·71·73·74·75·78·79·81·88·92·98·102·103·106·107·108·110·111·113·117·118·119·120·121·122·125·126·128·129·140·145·147·150·155·157·160·161·162·163·165·167·168·169·171·173·175·176·180·181·182·184·185·186·187·188·189·190·192·197·198·201·202·203·204·205·207·208·209·212·213·215·217·218·219·220·221·226·228·230·235·236]⚖[1·2·4·10·12·13·15·16·17·21·22·23·27·28·33·34·35·37·38·39·40·41·42·47·49·50·51·52·58·60·61·66·68·69·72·76·77·80·82·83·84·86·87·89·90·91·93·94·95·96·97·101·104·105·109·112·114·115·124·127·130·131·132·133·134·135·136·138·141·142·143·146·148·151·152·154·158·159·166·170·172·174·177·178·179·183·191·193·200·206·210·211·216·222·223·224·225·229·231·232·233·234·237·239·240·241·242] ➔ \n",
      "            >:[6·7·8·26·34·36·37·40·46·56·63·67·68·71·72·74·76·86·87·94·95·103·115·116·121·139·141·146·150·156·174·176·177·184·185·192·194·206·210·211·217·223·226·232·234·240]⚖[1·2·11·15·38·47·52·55·57·60·69·80·84·88·98·101·110·113·123·130·131·132·135·144·154·160·161·162·164·165·167·168·169·178·182·195·197·201·202·207·209·212·213·230·241·242] ➔ >:-84 =:-96 <:-87 \n",
      "            =:[1·11·16·19·38·41·43·44·57·60·62·66·69·70·77·82·95·99·111·114·142·146·161·185·186·193·198·199·200·201·202·204·212·230·233·238·239]⚖[3·8·33·46·48·52·53·55·59·76·83·87·100·101·102·104·109·110·121·125·133·136·145·148·150·155·158·168·196·203·205·211·219·226·227·229·236] ➔ >:-100 =:-85 <:-99 \n",
      "            <:[1·5·7·10·17·20·26·28·30·32·36·39·41·45·46·47·49·54·58·63·68·82·85·87·91·92·100·104·105·112·119·121·129·130·131·132·133·135·142·145·151·152·155·157·163·165·175·179·182·184·186·187·188·190·191·198·200·203·206·214·217·219·223·229·234·237]⚖[4·11·14·23·34·35·38·42·48·50·51·55·57·59·62·64·65·67·69·70·71·73·75·78·86·88·89·93·96·99·103·106·108·111·114·115·122·123·134·139·140·143·154·156·160·162·173·174·194·196·197·201·204·205·208·209·220·222·225·226·227·230·231·232·235·241] ➔ >:-106 =:-107 <:-92 \n",
      "   <:[1·2·5·6·7·9·10·12·13·14·19·21·23·27·33·36·37·40·42·45·47·50·56·62·70·77·79·82·83·91·99·100·101·102·104·105·109·110·113·115·116·128·131·133·134·138·143·144·148·149·154·156·157·159·161·163·169·177·181·183·184·185·187·194·195·197·200·203·206·209·212·213·214·219·220·222·223·226·230·237·242]⚖[3·8·15·17·22·26·28·29·30·32·35·43·44·46·48·49·53·54·57·59·61·63·64·66·72·74·81·85·90·92·93·97·98·103·106·108·111·112·118·120·123·124·125·126·135·141·142·145·146·147·151·152·155·160·162·166·167·168·170·171·172·173·176·178·186·190·193·202·205·207·210·211·215·216·217·218·224·229·234·236·239] ➔ \n",
      "      >:[2·3·4·9·13·14·16·20·21·22·25·29·32·33·35·39·40·45·52·54·61·66·72·73·76·77·83·84·85·86·87·93·94·97·99·100·102·106·110·111·112·115·119·122·124·125·126·127·132·134·138·139·140·141·148·149·152·153·154·160·164·165·166·167·168·171·172·173·175·176·177·178·185·190·192·194·197·202·203·204·205·208·209·211·215·217·218·219·221·223·228·233·235·241·242]⚖[1·5·6·7·8·10·11·15·18·19·23·24·27·36·37·41·42·46·49·51·53·55·56·58·59·63·64·67·75·78·79·80·81·82·88·89·90·95·96·101·105·113·116·117·118·121·123·128·130·131·133·135·136·142·143·144·145·146·150·151·155·156·157·158·159·161·163·169·170·174·181·182·184·186·189·193·195·196·198·199·200·201·207·210·212·222·224·225·226·227·229·230·234·239·240] ➔ \n",
      "         >:[5·7·10·13·14·16·17·18·21·23·25·27·32·37·38·39·40·41·46·49·52·54·55·57·58·59·61·62·67·69·73·74·75·78·82·83·86·93·95·99·100·101·103·105·106·111·112·115·116·117·122·123·131·132·134·136·137·138·142·155·156·158·160·163·169·172·174·175·176·178·180·183·184·187·190·191·192·198·201·204·205·209·211·213·214·218·221·222·223·225·226·227·233·236·242]⚖[1·3·4·9·11·12·15·19·20·26·29·30·33·42·44·47·48·50·53·56·63·65·68·71·77·84·85·87·88·89·90·91·92·94·96·102·104·108·109·110·114·118·119·120·124·125·126·128·129·130·139·141·143·144·146·149·150·151·152·153·159·161·162·164·165·166·167·168·170·181·182·185·186·194·195·196·199·200·203·207·208·212·215·216·217·220·224·228·230·234·235·238·239·240·241] ➔ \n",
      "            >:[4·11·20·23·25·29·32·38·40·49·50·51·55·56·57·61·63·65·66·69·72·76·77·78·91·93·94·101·102·104·106·108·112·116·118·119·120·124·128·134·135·136·140·144·155·157·158·159·163·164·165·168·170·177·179·180·182·189·197·198·205·206·208·210·219·224·225·226·227·240]⚖[6·9·13·16·24·28·31·34·37·41·44·53·54·58·67·71·73·75·80·81·82·83·84·90·95·97·98·107·110·122·125·131·132·133·137·139·141·147·150·151·153·154·169·172·175·176·181·184·191·193·196·200·202·203·204·209·212·220·222·228·229·230·231·233·234·236·237·238·239·241] ➔ >:-53 =:-15 <:-63 \n",
      "            =:[1·3·9·15·18·28·32·33·34·36·38·41·43·48·50·55·57·60·64·66·72·78·83·87·89·93·102·104·105·106·107·110·112·122·125·126·127·132·135·148·154·155·156·158·160·168·173·175·179·180·181·186·189·191·200·204·206·208·209·218·224·225·228·229·233·237·238·240·242]⚖[2·4·5·11·12·16·19·20·29·30·37·40·42·46·49·53·56·58·61·62·69·70·76·81·85·88·91·92·95·96·97·99·100·101·103·115·117·119·134·142·143·146·147·150·153·161·164·169·170·184·185·187·194·197·202·207·210·211·212·216·219·222·223·227·230·231·235·239·241] ➔ >:-81 =:-8 <:-64 \n",
      "            <:[5·6·12·18·22·30·37·39·48·49·66·70·73·74·85·102·103·104·105·111·127·130·136·155·156·169·171·178·180·184·192·196·208·213·222·232·238]⚖[15·16·23·34·35·47·58·59·60·69·72·75·78·79·83·91·106·113·114·124·125·126·135·137·142·148·163·164·166·168·170·176·207·215·220·225·233] ➔ >:-59 =:-46 <:-49 \n",
      "         =:[4·11·12·13·16·18·24·26·30·33·34·39·40·41·45·57·59·72·77·79·84·85·93·95·98·103·109·110·115·124·125·132·142·146·149·150·152·159·166·180·192·193·196·197·200·216·222·223·226·228·232·234·242]⚖[2·5·14·22·25·28·37·43·48·51·53·54·63·64·69·78·82·87·92·102·104·106·122·128·130·131·133·134·139·143·144·147·148·153·154·155·162·163·164·167·172·174·176·181·183·185·198·201·209·215·227·229·231] ➔ \n",
      "            >:[1·8·11·15·17·18·23·26·33·39·41·48·54·55·57·59·60·65·68·69·70·71·72·73·80·81·82·85·87·91·94·97·113·114·117·122·123·129·132·143·144·145·146·147·150·151·157·160·166·168·181·185·196·197·199·202·205·210·222·224·225·240·241]⚖[4·5·6·16·22·25·27·28·32·34·42·44·50·53·74·75·77·78·83·84·95·96·99·100·101·105·110·111·112·119·125·126·152·153·155·159·163·170·172·177·182·183·188·192·195·198·201·203·206·207·209·213·214·216·219·223·226·228·232·236·237·238·242] ➔ >:-28 =:-43 <:-48 \n",
      "            =:[1·9·10·11·15·17·19·22·26·34·35·36·38·39·48·52·58·62·64·66·78·88·89·90·96·99·101·110·113·114·123·128·130·133·140·141·143·144·146·152·160·164·173·174·176·178·182·184·190·197·199·200·203·210·212·213·218·220·221·222·227·228·229·230·238·241]⚖[4·5·14·20·24·27·29·30·31·32·44·60·63·68·69·70·71·72·73·75·77·80·81·82·84·86·87·91·93·97·105·107·111·115·120·124·126·127·132·137·139·145·148·154·157·159·161·162·166·168·170·177·179·186·187·188·194·204·205·209·223·225·234·235·236·240] ➔ >:-44 =:-74 <:-17 \n",
      "            <:[30·35·38·50·52·55·56·59·73·77·80·84·97·102·103·104·111·121·125·161·170·171·186·195·201·203·206·208·209·211·221·225·227·231·240]⚖[25·26·28·32·43·49·51·58·60·76·85·99·100·101·109·112·114·131·132·136·137·144·149·156·163·164·166·167·172·173·180·199·215·233·238] ➔ >:-26 =:-57 <:-30 \n",
      "         <:[1·6·7·13·18·23·26·27·29·33·34·39·42·45·47·51·52·53·61·69·72·73·75·79·82·84·85·86·91·93·95·98·99·100·104·105·106·113·114·115·126·129·139·140·142·145·150·157·161·166·168·173·174·177·182·183·188·190·193·201·206·208·209·212·214·215·216·221·222·224·226·228·231·235·239·241·242]⚖[8·9·10·16·17·19·20·22·28·31·35·36·43·48·49·50·54·56·62·63·65·68·71·74·78·83·90·101·102·107·108·111·112·116·119·120·122·124·125·127·132·133·134·135·136·138·143·148·149·151·152·154·155·159·160·167·171·175·179·181·184·185·186·187·191·194·198·200·202·204·210·211·223·225·233·234·240] ➔ \n",
      "            >:[2·4·8·9·10·13·14·21·24·26·27·34·35·45·49·50·52·57·65·66·72·77·81·83·84·92·94·95·99·103·104·106·108·115·116·118·126·138·140·141·143·144·146·147·149·154·155·161·167·169·177·180·184·185·190·193·196·206·213·215·219·222·229·240·242]⚖[3·7·12·15·19·22·23·25·29·36·37·41·58·59·63·67·71·75·78·79·85·86·89·90·93·97·100·105·107·110·114·122·131·133·134·135·136·137·139·142·145·150·153·160·162·165·175·176·178·186·189·192·194·197·198·199·202·203·207·212·214·217·221·225·231] ➔ >:-22 =:-54 <:-35 \n",
      "            =:[4·9·12·18·20·23·30·35·39·45·46·56·58·63·66·67·86·87·91·92·107·110·115·117·118·119·120·121·125·128·130·135·138·149·152·158·159·164·168·171·177·178·189·192·193·199·207·218·222·224·229·235·241]⚖[3·10·11·13·17·21·25·27·33·36·41·48·52·55·59·64·77·79·85·88·94·98·101·102·111·116·131·133·134·137·142·148·150·151·163·165·172·173·176·179·191·196·198·202·204·206·210·212·214·215·230·238·240] ➔ >:-3 =:-32 <:-66 \n",
      "            <:[2·3·4·10·23·30·31·32·49·56·60·66·69·72·73·76·77·79·85·89·90·94·98·99·101·104·115·118·125·127·139·142·145·155·156·159·160·169·171·174·177·179·186·191·197·203·211·212·213·215·217·218·221·222·225·226·242]⚖[6·7·12·16·18·25·26·29·33·37·38·39·41·42·43·44·45·51·52·65·68·71·78·84·87·93·96·97·103·105·112·114·120·129·130·132·136·137·143·148·153·154·157·170·187·193·196·198·205·207·210·216·223·230·231·237·240] ➔ >:-29 =:-61 <:-72 \n",
      "      =:[2·4·5·11·13·16·23·32·33·36·44·48·53·57·58·60·67·71·75·78·84·92·94·95·100·104·105·111·113·116·117·119·121·123·130·136·140·143·149·156·157·159·162·163·166·180·188·189·193·194·198·200·203·204·211·212·214·215·219·220·227·230·236·237·238]⚖[12·15·17·20·39·40·41·46·52·54·55·56·64·65·68·69·72·77·80·88·96·97·98·99·102·103·107·108·109·110·114·115·118·122·125·127·133·137·147·158·160·161·164·169·170·174·176·177·179·191·192·201·207·208·221·222·224·225·226·228·231·233·235·240·242] ➔ \n",
      "         >:[4·5·6·16·19·22·24·25·27·31·34·38·39·42·43·46·52·53·55·58·60·61·63·70·74·75·76·81·84·90·91·93·98·100·101·104·107·108·110·119·121·122·126·127·128·132·134·136·138·139·141·151·152·159·161·162·169·171·172·173·174·180·185·188·191·193·195·199·201·204·206·209·210·212·216·218·219·221·222·223·225·227·228·234·236·242]⚖[1·7·8·10·12·13·15·18·20·21·23·26·28·30·32·35·44·45·48·51·56·59·64·65·66·69·71·73·78·79·82·85·86·92·94·95·96·106·111·112·114·117·124·125·129·130·131·133·137·140·142·143·147·149·153·155·156·157·158·160·167·170·176·177·182·184·192·196·200·202·203·207·208·211·213·215·220·224·226·230·231·233·235·237·238·240] ➔ \n",
      "            >:[4·7·17·19·28·31·32·39·46·48·51·53·55·59·61·63·64·65·67·70·76·79·84·88·91·92·93·99·100·101·121·122·136·137·141·155·159·163·169·173·181·185·189·190·192·195·197·207·211·218·220·221·223·225·236·242]⚖[2·3·6·9·11·13·15·24·30·34·38·56·57·60·69·72·73·77·78·81·82·83·86·96·102·111·112·115·126·127·128·129·131·134·135·139·145·146·150·151·157·167·171·174·177·180·184·186·187·198·199·208·217·219·224·235] ➔ >:-69 =:-20 <:-65 \n",
      "            =:[2·19·29·33·54·68·79·87·94·96·112·126·135·154·162·168·173·192·194·197·203·230·232]⚖[6·8·13·21·37·43·53·55·67·80·83·115·123·124·129·136·156·170·177·178·189·214·221] ➔ >:-80 =:-41 <:-68 \n",
      "            <:[4·5·9·10·18·19·20·23·24·25·26·29·31·36·40·45·46·48·49·51·55·57·59·61·63·64·65·68·70·72·73·75·81·83·86·88·89·98·99·100·102·104·105·106·111·112·116·121·123·130·132·142·143·148·149·154·157·158·164·166·167·170·171·175·179·180·183·184·188·189·190·192·194·195·198·200·202·203·205·206·207·210·211·212·215·218·219·220·221·223·224·225·227·230·234·235·237·241·242]⚖[1·3·7·11·13·14·16·17·21·22·27·28·30·32·35·38·39·43·47·50·53·54·58·60·62·67·71·74·76·80·82·85·87·90·92·93·94·95·97·103·108·109·110·114·117·118·120·122·124·125·126·129·133·134·135·136·137·138·139·140·141·145·146·147·151·153·156·159·160·161·163·168·169·172·173·174·176·177·178·181·186·187·193·196·197·199·204·208·209·213·214·216·217·222·228·229·233·236·239] ➔ >:-39 =:-52 <:-55 \n",
      "         =:[2·3·6·9·14·16·17·31·34·35·37·39·51·54·57·60·61·68·69·72·80·81·82·83·84·85·91·96·98·100·101·104·110·112·114·123·128·129·130·138·139·140·143·144·145·146·151·154·163·164·167·175·176·182·183·185·187·190·194·196·197·201·203·204·210·212·216·223·225·226·227·234·236·237·238·241]⚖[1·4·7·11·13·18·19·21·23·24·25·28·36·40·41·43·44·45·46·47·48·50·53·65·67·70·77·87·88·89·93·94·95·99·103·111·113·115·116·119·120·121·126·127·133·135·141·142·150·152·155·157·158·159·161·165·166·168·171·174·178·179·180·181·193·195·198·199·205·209·213·215·222·224·231·239] ➔ \n",
      "            >:[1·9·15·18·19·22·23·26·28·31·40·42·47·51·62·63·67·70·71·73·74·75·80·89·90·92·93·94·95·98·99·101·108·110·112·114·121·127·130·133·135·137·138·140·142·143·147·149·153·159·161·164·169·172·175·176·182·183·185·186·191·194·197·198·203·207·209·212·214·217·218·221·226·227·229·231·233·238·240·242]⚖[2·7·11·14·17·24·29·30·32·35·37·38·41·43·44·45·46·48·52·53·54·59·64·65·66·81·82·83·84·85·87·88·97·100·102·103·104·105·107·109·115·116·118·119·122·123·124·125·128·131·134·136·139·141·151·152·154·158·160·163·165·166·168·171·173·174·177·180·181·187·190·201·208·213·216·224·228·234·237·241] ➔ >:-24 =:-25 <:-18 \n",
      "            =:[1·13·16·28·33·35·36·48·51·53·60·63·73·106·107·108·111·113·114·118·121·125·132·144·147·157·165·166·169·173·188·189·209·212·229·230·231·236]⚖[5·21·25·32·37·39·41·49·58·64·68·72·76·77·88·92·98·104·117·123·128·136·141·142·156·162·172·174·182·195·198·208·210·211·215·216·221·223] ➔ >:-76 =:-38 <:-73 \n",
      "            <:[1·2·6·11·25·27·29·34·35·45·48·58·62·63·69·77·80·84·91·94·97·106·110·111·117·119·120·124·125·130·133·134·137·141·145·148·155·161·175·178·185·189·201·208·212·215·228·233·240]⚖[4·31·39·50·52·61·70·76·79·82·85·89·92·93·95·96·98·104·114·116·123·126·129·131·136·139·150·151·156·163·168·171·173·180·186·187·196·202·203·213·217·218·219·220·223·225·230·235·237] ➔ >:-31 =:-51 <:-34 \n",
      "         <:[3·6·9·11·14·15·18·22·32·40·41·42·45·46·47·50·61·65·67·70·71·73·79·84·87·91·95·98·101·102·104·106·107·108·109·115·117·118·122·128·129·130·137·138·142·145·149·150·153·157·159·160·161·167·169·174·176·177·179·186·187·189·192·193·194·198·199·202·205·210·213·215·218·229·230·233·235·238·239·241]⚖[1·5·7·10·17·21·23·24·30·31·38·48·49·52·53·55·56·57·58·62·63·66·68·69·72·75·76·78·80·81·82·85·86·88·89·92·97·99·100·103·110·111·116·119·126·133·140·146·147·155·162·165·173·175·178·180·181·182·183·185·190·191·197·203·204·207·208·209·211·216·217·219·223·226·227·228·231·237·240·242] ➔ \n",
      "            >:[9·11·23·27·29·32·33·35·40·41·43·52·56·59·60·65·72·76·77·78·79·81·84·86·87·91·97·99·100·101·106·108·112·113·114·121·125·129·132·135·138·143·147·152·153·164·167·169·174·178·179·180·184·191·192·200·205·206·210·211·217·218·220·223·231·235·237·241]⚖[1·4·5·19·21·26·30·34·36·37·38·45·49·54·55·62·63·68·69·71·73·75·80·88·89·90·92·94·95·96·102·103·104·115·118·137·141·142·145·148·149·154·155·160·162·165·170·171·172·175·176·185·186·188·189·194·195·196·199·203·204·216·219·226·230·236·239·242] ➔ >:-75 =:-58 <:-78 \n",
      "            =:[1·2·3·13·15·16·22·25·36·46·49·56·58·65·66·71·94·96·97·99·104·108·109·116·118·120·121·127·131·132·133·134·135·140·142·143·144·148·149·157·158·159·160·164·167·171·172·179·186·188·191·198·202·210·212·215·219·220·223·232·233·236·238·239·240·242]⚖[5·6·8·10·11·14·29·30·33·37·38·40·44·45·47·51·54·55·57·59·60·61·62·63·64·67·70·73·77·85·86·87·88·89·91·98·114·117·122·124·125·126·129·130·137·139·141·145·146·153·155·163·168·174·181·182·185·193·194·196·201·207·225·226·231·235] ➔ >:-60 =:-4 <:-16 \n",
      "            <:[11·12·24·29·38·43·50·52·53·59·76·86·111·119·128·130·141·143·168·178·179·186·190·200·212·213·222]⚖[6·48·51·64·67·72·74·93·98·107·118·133·149·151·159·167·174·175·187·193·194·197·208·221·224·228·230] ➔ >:-67 =:-71 <:-11 \n",
      "      <:[3·4·5·9·10·11·12·13·17·21·24·31·33·35·44·46·48·49·51·56·58·61·63·68·78·79·80·82·84·86·91·92·93·106·108·110·112·115·119·123·127·130·131·133·136·139·141·144·151·159·163·164·166·167·170·173·178·179·180·181·182·184·188·189·192·194·198·199·201·203·205·209·213·214·220·223·225·226·229·230]⚖[1·2·7·8·14·16·18·20·25·32·34·43·45·47·53·55·57·59·60·62·64·66·67·69·70·74·75·76·77·81·83·85·87·94·95·100·103·109·111·114·116·118·120·122·125·126·128·132·140·142·147·149·150·155·162·165·168·171·172·174·185·186·187·191·193·197·200·206·208·210·215·217·221·224·228·233·238·240·241·242] ➔ \n",
      "         >:[2·7·8·17·18·19·23·28·30·32·35·36·37·40·41·42·43·44·45·49·51·52·53·54·59·61·63·65·71·73·79·82·83·85·89·91·94·95·96·97·102·105·110·111·112·121·123·124·125·126·128·130·132·133·136·138·139·145·147·150·153·154·161·164·166·167·175·178·183·186·187·188·189·190·192·195·198·200·205·207·210·211·213·215·217·223·228·231·232·234·235·236·237·238·241·242]⚖[3·4·5·10·15·24·25·27·31·33·34·39·47·48·50·56·57·58·60·64·66·67·69·70·72·74·75·77·81·86·87·88·90·92·100·101·104·106·108·109·114·115·116·117·118·119·120·122·127·129·131·134·135·137·140·141·142·143·146·149·151·155·156·160·162·165·168·169·170·171·172·173·174·177·179·180·182·184·185·191·193·194·196·199·201·202·204·208·209·212·214·226·229·230·239·240] ➔ \n",
      "            >:[2·6·10·13·16·24·32·36·43·47·51·58·60·73·74·84·85·86·93·99·104·107·108·114·116·118·119·120·123·125·128·131·149·151·152·158·165·169·173·175·177·185·190·197·198·200·207·208·211·212·216·217·221·223·226·228·230·232·233·237]⚖[1·3·8·15·17·18·23·30·41·44·45·52·54·56·57·63·66·70·72·80·88·91·92·94·95·100·106·110·111·124·126·129·132·133·134·135·137·141·153·154·161·162·164·170·176·178·179·180·183·201·209·210·213·215·219·220·222·229·234·240] ➔ >:-70 =:-77 <:-47 \n",
      "            =:[4·7·9·10·13·15·17·24·29·30·32·39·41·44·45·59·61·62·63·71·76·77·84·86·87·97·98·100·102·105·108·109·112·114·116·124·125·126·132·140·145·146·147·150·151·154·156·158·160·161·167·173·174·183·186·187·191·195·199·200·201·203·206·208·214·216·223·230·231·234·238·241]⚖[2·3·6·12·14·16·18·26·28·34·35·38·42·46·49·50·57·58·65·68·69·70·72·75·82·83·88·89·90·91·93·94·95·99·103·106·121·122·129·130·131·134·136·137·144·148·157·162·163·165·166·169·170·177·179·181·184·196·202·204·205·210·211·213·218·221·222·226·229·232·233·242] ➔ >:-14 =:-1 <:-62 \n",
      "            <:[4·10·20·27·29·31·33·35·42·44·45·52·53·55·56·57·65·69·70·71·72·74·76·79·80·82·84·85·86·96·99·100·101·102·106·111·114·115·118·119·132·136·137·140·141·145·149·150·156·163·167·172·173·179·180·184·188·190·195·198·203·204·206·209·211·214·223·229·239]⚖[2·6·8·12·13·15·16·22·25·26·30·34·36·46·48·49·51·54·59·60·61·66·75·78·83·95·103·107·108·109·113·116·121·123·125·133·134·142·143·144·146·148·151·153·154·155·157·158·160·164·166·174·175·176·177·178·186·193·194·199·201·216·219·220·226·230·235·240·242] ➔ >:-2 =:-7 <:-45 \n",
      "         =:[4·7·10·13·14·16·17·21·22·23·24·25·31·36·38·43·46·47·48·49·50·52·54·55·57·67·68·69·71·73·83·89·91·93·94·95·97·111·112·114·116·119·131·133·134·137·144·145·153·154·155·157·163·165·169·171·175·176·177·178·180·190·191·192·196·197·199·202·203·211·215·218·220·221·224·235·238]⚖[1·6·8·11·12·18·27·28·29·30·34·35·41·42·44·58·61·62·63·64·66·72·79·84·90·92·96·99·100·104·107·108·109·110·113·115·117·122·124·127·129·130·132·135·136·139·142·143·146·147·148·149·156·158·160·161·162·168·170·173·183·186·200·204·208·209·213·214·216·217·219·228·229·234·236·239·242] ➔ \n",
      "            >:[3·4·6·10·21·24·29·35·40·44·50·52·60·65·69·78·79·92·94·95·96·97·106·112·116·119·122·124·126·134·137·157·158·163·166·168·170·175·181·183·186·188·189·190·196·201·204·208·212·213·216·224·225·227·230·234·235·240·241·242]⚖[5·11·12·14·16·23·26·32·34·41·42·45·48·49·59·62·64·66·70·73·74·81·82·84·87·93·98·101·104·108·121·123·125·127·130·135·136·139·140·144·152·153·162·173·174·176·178·179·182·185·198·199·200·205·206·217·226·232·236·239] ➔ >:-42 =:-27 <:-6 \n",
      "            =:[6·10·12·13·14·15·16·23·32·38·40·42·43·45·46·47·48·50·56·57·59·60·66·67·69·81·83·84·87·94·98·100·102·105·107·114·117·120·123·127·129·130·136·137·139·144·145·146·154·158·159·162·164·165·166·170·176·178·179·186·193·195·200·201·202·203·206·208·214·215·216·219·222·225·231·233·234·237·241]⚖[1·2·3·4·5·8·17·18·20·22·31·33·34·35·36·37·41·49·63·65·68·70·74·75·85·88·89·90·92·96·97·109·111·112·113·116·119·121·122·124·131·132·135·138·142·147·149·150·153·156·157·160·163·168·169·173·174·177·180·182·183·185·188·189·198·205·207·209·212·217·218·220·223·224·229·232·235·236·242] ➔ >:-37 =:-19 <:-40 \n",
      "            <:[2·10·12·13·22·27·29·38·40·49·50·63·73·76·86·87·90·91·94·103·109·115·125·131·138·143·145·148·149·155·162·167·174·175·180·181·184·197·198·202·203·209·210·225·231·235·236·237]⚖[4·14·17·23·26·33·45·47·57·65·67·69·84·93·97·100·101·108·113·121·122·139·140·141·144·146·150·152·153·157·168·169·172·177·182·189·193·195·201·204·207·213·215·218·223·226·229·240] ➔ >:-23 =:-36 <:-50 \n",
      "         <:[1·4·7·10·11·12·16·17·18·23·24·25·30·35·36·37·42·43·46·49·54·55·58·61·64·67·71·74·75·76·79·80·82·88·91·92·93·95·97·102·103·113·114·118·120·121·125·126·128·135·136·137·140·141·143·150·151·152·153·156·157·158·161·162·163·165·169·171·173·179·181·183·184·185·186·187·189·195·197·199·201·202·203·204·207·211·213·215·219·221·223·224·226·228·229·230·231·232·238·241]⚖[3·5·8·13·15·19·21·22·26·29·31·32·34·38·39·41·44·45·47·48·50·51·52·53·57·60·62·63·65·68·69·70·72·73·77·78·81·83·84·87·90·94·101·104·105·106·107·109·111·112·115·116·117·119·122·123·124·129·130·132·138·139·142·145·148·154·155·159·160·164·166·167·168·170·172·174·175·176·177·178·180·182·190·191·193·196·198·200·206·209·212·216·217·220·225·227·233·239·240·242] ➔ \n",
      "            >:[1·2·5·7·10·15·17·19·27·31·34·38·39·40·47·49·50·52·57·58·61·68·74·76·79·84·89·92·93·94·99·110·111·113·114·121·122·132·136·137·139·142·146·150·152·153·161·172·174·176·178·181·192·195·196·200·207·211·213·219·236·238]⚖[4·12·14·20·21·28·29·36·37·42·46·48·53·63·64·65·75·77·80·86·87·91·96·98·106·107·116·126·130·134·135·145·148·151·162·165·167·169·171·175·177·179·180·183·186·189·190·193·202·204·206·214·215·218·220·222·225·228·233·234·237·241] ➔ >:-21 =:-13 <:-5 \n",
      "            =:[9·24·36·48·59·62·65·124·133·136·180·209·213·225·228·236]⚖[5·8·18·22·49·50·56·63·64·69·103·135·176·184·201·212] ➔ >:-56 =:-33 <:-9 \n",
      "            <:[8·14·18·19·21·23·30·33·39·41·44·47·51·52·54·55·73·75·77·79·82·83·85·87·88·90·91·93·98·100·106·109·112·113·117·118·119·120·121·122·127·129·133·135·138·141·149·152·153·156·160·161·163·165·175·179·180·182·191·194·195·199·203·205·208·210·211·214·217·218·231·234·235]⚖[10·11·13·16·17·20·27·29·32·36·37·40·50·58·59·64·68·69·80·92·96·101·104·108·110·114·115·116·126·128·130·131·134·136·137·139·140·144·145·147·151·155·157·164·166·167·168·169·172·173·176·177·181·184·185·186·190·193·196·200·202·204·209·212·219·220·224·225·226·227·229·240·242] ➔ >:-10 =:-12 <:-79\n"
     ]
    }
   ],
   "source": [
    "do(Puzzle(242, 5, {-1, 0}))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# What's Next?\n",
    "\n",
    "- What other puzzles can you solve?\n",
    "- Can you make a table summarizing the space of solved and unsolved puzzles? \n",
    "- Can you *prove* the unsolved puzzles are unsolvable? \n",
    "- Currently, when `solve` returns `None`, it means \"no solution was found, but there's no proof that a solution doesn't exist.\" Can you modify `solve` to return a result that indicates there is no possible solution? (Maybe you can only do this on some puzzles, not all.)\n",
    "- What about puzzles where your task is to identify *which* ball is odd, but not *how* it is odd? That is, if you get the possibilities down to `{-3, +3}` then you're done; you know ball 3 is the odd one, and you don't care if it is heavy or light.\n",
    "- Can you find trees that minimize the *mean* number of weighings, rather than minimizing the *maximum* number of weighings?\n",
    "- What happens when it is a possibility that *two* balls are odd?  Or more?\n",
    "- What if you had two or more balance scales that you could use in parallel, and the goal was to minimize the number of weighing time periods, not the total number of weighings?\n",
    "- What else can you discover?"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
